Permalink
Browse files

Simplify 'char' parser

Thanks to Ivan Veselov for noticing
  • Loading branch information...
1 parent e7de167 commit 97123c32e7b77b24ba6d6cf964d8368812de467a @feuerbach feuerbach committed Oct 16, 2010
Showing with 1 addition and 7 deletions.
  1. +1 −7 Parsec.hs
View
@@ -83,14 +83,8 @@ satisfy f = try $ do
then do lineConts; Base.satisfy f
else Base.satisfy f
--- if skipLineContinuation is True, line continuation will be skipped /before/
--- the char
char :: Char -> Parser Char
-char x = try $ do
- skiplc <- asks skipLineContinuation
- if skiplc
- then do lineConts; Base.char x
- else Base.char x
+char = satisfy . (==)
-- if skipLineContinuation is True, line continuation will be skipped before and
-- inside the string

0 comments on commit 97123c3

Please sign in to comment.