on master help sign in
Fix issue in which type expressions eat trailing whitespace.
commita7bb2b7ac37946d328f6647b11413f0cdef1388e authorEvan Czaplicki <info@elm-lang.org> dateFri 6 Sep 2013, 12:22 (13 years ago) parentd851c5e
1 file changed+2−4
compiler/Parse/Type.hs+2−4
compiler/Parse/Type.hs+2−4
@@ -62,11 +62,9 @@ app =
6262expr :: IParser T.Type
6363expr =
6464 do t1 <- app <|> term
65− whitespace
66− arr <- optionMaybe (try arrow)
67− whitespace
65+ arr <- optionMaybe $ try (whitespace >> arrow)
6866 case arr of
69− Just _ -> T.Lambda t1 <$> expr
67+ Just _ -> T.Lambda t1 <$> (whitespace >> expr)
7068 Nothing -> return t1
7169
7270constructor :: IParser (String, [T.Type])