You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
length::s->Int
length = Data.String.length
take::Int->s->s
take = Data.String.take
Then we can write
match::forallmsa. ParserTsma->ParserTsm (Tupleas)
match p = doParseState input1 _ _ <- get
x <- p
ParseState input2 _ _ <- get
pure $ Tuple x $ take (length input1 - length input2) input1
The text was updated successfully, but these errors were encountered:
We should have the super-useful
match
combinator.Megaparsec.match
Attoparsec.match
To write this combinator for
Text.Parsing.Parser.String
, I think we will need some more members ofStringLike
.purescript-parsing/src/Text/Parsing/Parser/String.purs
Lines 21 to 25 in e801a0e
Maybe if we have
Then we can write
The text was updated successfully, but these errors were encountered: