diff options
-rw-r--r-- | src/Unlambda/Parser.hs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/Unlambda/Parser.hs b/src/Unlambda/Parser.hs index 23bf723..4853d74 100644 --- a/src/Unlambda/Parser.hs +++ b/src/Unlambda/Parser.hs @@ -13,20 +13,14 @@ import Unlambda.Types parseUnlambda :: String -> Either ParseError UnlambdaTerm -parseUnlambda input = - let firstPass = parse removeComments "error" input - in case firstPass of - Left e -> Left e - Right o -> parse unlambda "error" o +parseUnlambda input = + parse removeComments "error" input >>= parse unlambda "error" parseUnlambda1 :: String -> Either ParseError UnlambdaTerm parseUnlambda1 input = - let firstPass = parse removeComments "error" input - in case firstPass of - Left e -> Left e - Right o -> parse unlambda1 "error" o + parse removeComments "error" input >>= parse unlambda1 "error" |