Skip to content

remove unneeded Expected from String parsers fix #60 #61

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

Merged
merged 1 commit into from
Jun 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Text/Parsing/Parser/String.purs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ satisfy f = try do

-- | Match the specified character
char :: forall s m. StringLike s => Monad m => Char -> ParserT s m Char
char c = satisfy (_ == c) <?> ("Expected " <> show c)
char c = satisfy (_ == c) <?> show c

-- | Match a whitespace character.
whiteSpace :: forall s m. StringLike s => Monad m => ParserT s m String
Expand All @@ -83,8 +83,8 @@ skipSpaces = void whiteSpace

-- | Match one of the characters in the array.
oneOf :: forall s m. StringLike s => Monad m => Array Char -> ParserT s m Char
oneOf ss = satisfy (flip elem ss) <?> ("Expected one of " <> show ss)
oneOf ss = satisfy (flip elem ss) <?> ("one of " <> show ss)

-- | Match any character not in the array.
noneOf :: forall s m. StringLike s => Monad m => Array Char -> ParserT s m Char
noneOf ss = satisfy (flip notElem ss) <?> ("Expected none of " <> show ss)
noneOf ss = satisfy (flip notElem ss) <?> ("none of " <> show ss)