Last active
January 2, 2016 12:09
-
-
Save funrep/8301310 to your computer and use it in GitHub Desktop.
Weird behaviour by the Parser params
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
params :: Parser Params | |
params = do | |
ps <- takeWhile (notInClass ":\r") `sepBy` space |
Author
funrep
commented
Jan 7, 2014
Behaviour I want:
> maybeResult $ parse params $ T.pack "foo bar xyz :"
Just ["foo", "bar", "xyz"]
> maybeResult $ parse params $ T.pack "foo bar xyz\r"
Just ["foo", "bar", "xyz"]
How can this NOT work? o.o
*Tob.Parser> let p = takeWhile (/= '\n') `sepBy` space
*Tob.Parser> maybeResult $ parse p $ T.pack "hahah ahahah ahahah\n"
Nothing
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment