diff options
-rw-r--r-- | src/Haskell/Parser.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Haskell/Parser.hs b/src/Haskell/Parser.hs index dcee39e..41216d5 100644 --- a/src/Haskell/Parser.hs +++ b/src/Haskell/Parser.hs @@ -43,6 +43,7 @@ pExpr = pLam <|> pCase <|> pApp pLam = do symbolO "\\" args <- many1 pNameV + symbolO "->" body <- pExpr return $ Lam args body @@ -93,7 +94,7 @@ pNameT :: Parser Name pNameT = notReserved $ liftM2 (:) (satisfy isUpper) pNameRest pNameRest :: Parser Name -pNameRest = many (satisfy $ \d -> isAlphaNum d || d == '_') <* aheadW +pNameRest = many (satisfy $ \d -> isAlphaNum d || d `elem` "_'") <* aheadW notReserved :: Parser Name -> Parser Name notReserved p = @@ -120,7 +121,7 @@ symbolBare s = string s >> whitespace aheadW :: Parser () aheadW = do - void (lookAhead (space <|> satisfy (\d -> not (isAlphaNum d) && d /= '_'))) <|> eof + void (lookAhead (space <|> satisfy (\d -> not (isAlphaNum d) && d `notElem` "_'"))) <|> eof whitespace aheadO :: Parser () |