module Deriv.StrMat.Text.Lazy ( Str , Mat , group , groups , match , matchAndGroups , regexing , toUpper , loadFile ) where import qualified Data.Text.Lazy as L (Text) import qualified Data.Text.Lazy as L.Txt import qualified Data.Text.Lazy.IO as L.Txt.IO import Optics.Core (IxTraversal', Getter) import Optics.Regex.Text.Lazy (Match) import qualified Optics.Regex.Text.Lazy as Opt.L.Txt import Text.Regex.PCRE.Heavy (Regex) type Str = L.Text type Mat = Match group :: Int -> IxTraversal' Str Mat Str group = Opt.L.Txt.group groups :: IxTraversal' Str Mat [Str] groups = Opt.L.Txt.groups match :: IxTraversal' [Str] Mat Str match = Opt.L.Txt.match matchAndGroups :: Getter Mat (Str, [Str]) matchAndGroups = Opt.L.Txt.matchAndGroups regexing :: Regex -> IxTraversal' Int Str Mat regexing = Opt.L.Txt.regexing toUpper :: Str -> Str toUpper = L.Txt.toUpper loadFile :: String -> IO Str loadFile = L.Txt.IO.readFile