git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Revert "Fix error in check - expand type synonyms first"

This reverts commit 21e5b86fa1d13b8952735ccd1882353b265b9398.

commit008410993857530e6f2848f479eca3fc1a18312c authorPhil Freeman <paf31@cantab.net> dateMon 13 Jan 2014, 11:27 (13 years ago) parent21e5b86
1 file changed+3−3
src/Language/PureScript/TypeChecker/Types.hs+3−3
src/Language/PureScript/TypeChecker/Types.hs+3−3
@@ -591,9 +591,6 @@ check' val u@(TUnknown _) = do
591591 ty' <- replaceAllVarsWithUnknowns ty
592592 ty' ~~ u
593593 return val'
594−check' val (SaturatedTypeSynonym name args) = do
595− ty <- expandTypeSynonym name args
596− check val ty
597594check' v@(NumericLiteral _) Number = return $ TypedValue v Number
598595check' v@(StringLiteral _) String = return $ TypedValue v String
599596check' v@(BooleanLiteral _) Boolean = return $ TypedValue v Boolean
@@ -660,6 +657,9 @@ check' (Constructor c) ty = do
660657 repl <- replaceAllTypeSynonyms ty1
661658 repl `subsumes` ty
662659 return $ TypedValue (Constructor c) ty
660+check' val (SaturatedTypeSynonym name args) = do
661+ ty <- expandTypeSynonym name args
662+ check val ty
663663check' val ty = throwError $ prettyPrintValue val ++ " does not have type " ++ prettyPrintType ty
664664
665665checkProperties :: [(String, Value)] -> Type -> Bool -> Subst [(String, Value)]