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