@@ -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)]