on master help sign in
Fix issue in which type expressions eat trailing whitespace.
a7bb2b7Evan Czaplicki
compiler/Parse/Type.hs+2−4
@@ -62,11 +62,9 @@ app =
62expr :: IParser T.Type
62expr :: IParser T.Type
63expr =
63expr =
64 do t1 <- app <|> term
64 do t1 <- app <|> term
65− whitespace
66− arr <- optionMaybe (try arrow)
65+ arr <- optionMaybe $ try (whitespace >> arrow)
67− whitespace
68 case arr of
66 case arr of
69− Just _ -> T.Lambda t1 <$> expr
67+ Just _ -> T.Lambda t1 <$> (whitespace >> expr)
70 Nothing -> return t1
68 Nothing -> return t1
71
69
72constructor :: IParser (String, [T.Type])
70constructor :: IParser (String, [T.Type])