Fix issue in which type expressions eat trailing whitespace.

This commit is contained in:
Evan Czaplicki 2013-09-06 12:22:01 -07:00
parent d851c5e315
commit a7bb2b7ac3

View file

@ -62,11 +62,9 @@ app =
expr :: IParser T.Type
expr =
do t1 <- app <|> term
whitespace
arr <- optionMaybe (try arrow)
whitespace
arr <- optionMaybe $ try (whitespace >> arrow)
case arr of
Just _ -> T.Lambda t1 <$> expr
Just _ -> T.Lambda t1 <$> (whitespace >> expr)
Nothing -> return t1
constructor :: IParser (String, [T.Type])