Closed
Description
I needed this rest
parser today so I wrote something like it. It's pretty common and I think we should include it in the primitive parsers for Text.Parsing.Parser.String
.
-- | Parse and return the rest of the input. Always succeeds.
rest :: forall m. Monad m => ParserT String m String
rest = do
ParseState input position _ <- get
set $ ParseState "" (updatePosString position input) true
pure input
Except we can't write it for StringLike
. Are we sure that the StringLike
typeclass is a good idea?
rest :: forall m s. StringLike s => Monad m => ParserT s m s
Metadata
Metadata
Assignees
Labels
No labels