X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypes%2FType.lhs;h=461439509b7d2e299a3482bde6d13ac265ffafe0;hb=c94408e522e5af3b79a5beadc7e6d15cee553ee7;hp=ccabfb778a004a8ca739e0fde0fa448477f937b1;hpb=c76c69c5b62f1ca4fa52d75b0dfbd37b7eddbb09;p=ghc-hetmet.git diff --git a/compiler/types/Type.lhs b/compiler/types/Type.lhs index ccabfb7..4614395 100644 --- a/compiler/types/Type.lhs +++ b/compiler/types/Type.lhs @@ -47,7 +47,7 @@ module Type ( splitTyConApp_maybe, splitTyConApp, splitNewTyConApp_maybe, splitNewTyConApp, - repType, typePrimRep, coreView, tcView, stgView, kindView, + repType, typePrimRep, coreView, tcView, kindView, mkForAllTy, mkForAllTys, splitForAllTy_maybe, splitForAllTys, applyTy, applyTys, isForAllTy, dropForAlls, @@ -123,7 +123,6 @@ import TyCon ( TyCon, isRecursiveTyCon, isPrimTyCon, isFunTyCon, isNewTyCon, newTyConRep, newTyConRhs, isAlgTyCon, tyConArity, isSuperKindTyCon, tcExpandTyCon_maybe, coreExpandTyCon_maybe, - stgExpandTyCon_maybe, tyConKind, PrimRep(..), tyConPrimRep, tyConUnique, isCoercionTyCon_maybe, isCoercionTyCon ) @@ -177,19 +176,6 @@ coreView (TyConApp tc tys) | Just (tenv, rhs, tys') <- coreExpandTyCon_maybe tc -- partially-applied type constructor; indeed, usually will! coreView ty = Nothing -{-# INLINE stgView #-} -stgView :: Type -> Maybe Type --- When generating STG from Core it is important that we look through newtypes --- but for the rest of Core we are just using coercions. This does just what --- coreView USED to do. -stgView (NoteTy _ ty) = Just ty -stgView (PredTy p) = Just (predTypeRep p) -stgView (TyConApp tc tys) | Just (tenv, rhs, tys') <- stgExpandTyCon_maybe tc tys - = Just (mkAppTys (substTy (mkTopTvSubst tenv) rhs) tys') - -- Its important to use mkAppTys, rather than (foldl AppTy), - -- because the function part might well return a - -- partially-applied type constructor; indeed, usually will! -stgView ty = Nothing -----------------------------------------------