git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #1487 from purescript/containsTypeSynonyms
7e0fe37Phil Freeman
src/Language/PureScript/TypeChecker/Types.hs−9
@@ -599,9 +599,6 @@ check' v@(Constructor c) ty = do
599check' (Let ds val) ty = do
599check' (Let ds val) ty = do
600 (ds', val') <- inferLetBinding [] ds val (`check` ty)
600 (ds', val') <- inferLetBinding [] ds val (`check` ty)
601 return $ TypedValue True (Let ds' val') ty
601 return $ TypedValue True (Let ds' val') ty
602−check' val ty | containsTypeSynonyms ty = do
603− ty' <- introduceSkolemScope <=< expandAllTypeSynonyms <=< replaceTypeWildcards $ ty
604− check val ty'
605check' val kt@(KindedType ty kind) = do
602check' val kt@(KindedType ty kind) = do
606 checkTypeKind ty kind
603 checkTypeKind ty kind
607 val' <- check' val ty
604 val' <- check' val ty
@@ -615,12 +612,6 @@ check' val ty = do
615 Nothing -> throwError . errorMessage $ SubsumptionCheckFailed
612 Nothing -> throwError . errorMessage $ SubsumptionCheckFailed
616 Just v' -> return $ TypedValue True v' ty
613 Just v' -> return $ TypedValue True v' ty
617
614
618−containsTypeSynonyms :: Type -> Bool
619−containsTypeSynonyms = everythingOnTypes (||) go where
620− go (SaturatedTypeSynonym _ _) = True
621− go _ = False
622−
623−
624-- |
615-- |
625-- Check the type of a collection of named record fields
616-- Check the type of a collection of named record fields
626--
617--