@@ -54,8 +54,7 @@ parseForAll = mkForAll <$> ((reserved "forall" <|> reserved "∀") *> P.many1 (i
55parseTypeAtom :: TokenParser Type
55parseTypeAtom :: TokenParser Type
56parseTypeAtom = indented *> P.choice
56parseTypeAtom = indented *> P.choice
57− [ P.try parseConstrainedType
58− , P.try parseFunction
57+ [ P.try parseFunction
59 , parseTypeLevelString
58 , parseTypeLevelString
60 , parseObject
59 , parseObject
61 , parseTypeWildcard
60 , parseTypeWildcard
@@ -81,9 +80,8 @@ parseConstrainedType = do
81 ty <- P.many parseTypeAtom
80 ty <- P.many parseTypeAtom
82 return (Constraint className ty Nothing)
81 return (Constraint className ty Nothing)
85parseAnyType :: TokenParser Type
83parseAnyType :: TokenParser Type
86−parseAnyType = P.buildExpressionParser operators (buildPostfixParser postfixTable parseTypeAtom) P.<?> "type"
84+parseAnyType = P.buildExpressionParser operators (buildPostfixParser postfixTable (P.try parseConstrainedType <|> parseTypeAtom)) P.<?> "type"
88 operators = [ [ P.Infix (return TypeApp) P.AssocLeft ]
86 operators = [ [ P.Infix (return TypeApp) P.AssocLeft ]
89 , [ P.Infix (P.try (parseQualified parseOperator) >>= \ident ->
87 , [ P.Infix (P.try (parseQualified parseOperator) >>= \ident ->