@@ -591,6 +591,9 @@ 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
594597check' v@(NumericLiteral _) Number = return $ TypedValue v Number
595598check' v@(StringLiteral _) String = return $ TypedValue v String
596599check' v@(BooleanLiteral _) Boolean = return $ TypedValue v Boolean
@@ -657,9 +660,6 @@ check' (Constructor c) ty = do
657660 repl <- replaceAllTypeSynonyms ty1
658661 repl `subsumes` ty
659662 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)]