Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

space parses zero or more whitespace, while it would make more sense to parse only one! #33

Open
bgaster opened this issue Sep 25, 2015 · 0 comments

Comments

@bgaster
Copy link

bgaster commented Sep 25, 2015

Currently Lightyear.Strings.space parses zero or more whitespace, which seems strange given it singular naming. Moreover, this is in contrast to Parsec which defines:

space

and

spaces

to separate these two cases. From Parsec.Text.Chars:

-- | Skips /zero/ or more white space characters. See also 'skipMany'.
spaces :: (Stream s m Char) => ParsecT s u m ()
spaces = skipMany space <?> "white space"

-- | Parses a white space character (any character which satisfies 'isSpace')
-- Returns the parsed character.

space :: (Stream s m Char) => ParsecT s u m Char
space = satisfy isSpace <?> "space"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant