<div dir="ltr"><div><div><div>I just tried some regex-applicative and it's amazing! Very nice library, thanks Roman!<br><br></div>However, I can't figure out the best way to work with Data.Text.Text instead of String. The token would be Text, I guess, but then it breaks in composition, since type of `few anySym` would now return `[Text]`, not `Text`.<br><br></div>Am I understanding this correctly that intention is to in issue #8? [0] Or is there a clever way to work with them today?<br><br>Example code:<br><br>{-# LANGUAGE OverloadedStrings #-}<br><br>import qualified Data.Text as T<br>import Data.Text (Text)<br>import Text.Regex.Applicative<br><br>main = do<br></div><div>  let input = "foo:\n--- blablabla\ttheend"<br></div><div>  let r1 = sym "foo:\n"<br>                      *> sym "--- " *> few anySym <* sym "\t" <* few anySym<br></div>            :: RE Text Text<br><div><br>  putStrLn (show (input =~ r1))<br><br></div><div>Error is something like (this is an error for a bit different code, but should be very similar):<br><br>Main.hs:14:40:<br>    Couldn't match type ‘[Text]’ with ‘Text’<br>    Expected type: RE Text Text<br>      Actual type: RE Text [Text]<br>    In the second argument of ‘(*>)’, namely ‘few anySym’<br>    In the first argument of ‘(<*)’, namely<br>      ‘few anySym *> sym "Actual stderr output differs from expected:"<br>       *> sym "--- "<br>       *> few anySym’<br></div><div><br></div><div>Thanks!<br></div><div><br>[0]: <a href="https://github.com/feuerbach/regex-applicative/issues/8">https://github.com/feuerbach/regex-applicative/issues/8</a><br></div></div>