X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypes%2FType.lhs;h=9720470b9d8189cf337354a1b28c078902b68baf;hb=d51aa9da8ced82cc4762b6e69fd5f147fb5c7eb8;hp=333b589403c4e9a65ddccc3d6a6ef59d6dc49cf0;hpb=98688c6e8fd33f31c51218cf93cbf03fe3a5e73d;p=ghc-hetmet.git diff --git a/ghc/compiler/types/Type.lhs b/ghc/compiler/types/Type.lhs index 333b589..9720470 100644 --- a/ghc/compiler/types/Type.lhs +++ b/ghc/compiler/types/Type.lhs @@ -41,7 +41,7 @@ module Type ( applyTy, applyTys, isForAllTy, dropForAlls, -- Source types - isPredTy, predTypeRep, mkPredTy, mkPredTys, + predTypeRep, mkPredTy, mkPredTys, -- Newtypes splitRecNewType_maybe, @@ -182,8 +182,7 @@ invariant: use it. \begin{code} mkAppTy orig_ty1 orig_ty2 - = ASSERT2( not (isPredTy orig_ty1), crudePprType orig_ty1 ) -- Source types are of kind * - mk_app orig_ty1 + = mk_app orig_ty1 where mk_app (NoteTy _ ty1) = mk_app ty1 mk_app (NewTcApp tc tys) = NewTcApp tc (tys ++ [orig_ty2]) @@ -206,8 +205,7 @@ mkAppTys orig_ty1 [] = orig_ty1 -- returns to (Ratio Integer), which has needlessly lost -- the Rational part. mkAppTys orig_ty1 orig_tys2 - = ASSERT( not (isPredTy orig_ty1) ) -- Source types are of kind * - mk_app orig_ty1 + = mk_app orig_ty1 where mk_app (NoteTy _ ty1) = mk_app ty1 mk_app (NewTcApp tc tys) = NewTcApp tc (tys ++ orig_tys2) @@ -555,11 +553,6 @@ predTypeRep (IParam _ ty) = ty predTypeRep (ClassP clas tys) = mkTyConApp (classTyCon clas) tys -- Result might be a NewTcApp, but the consumer will -- look through that too if necessary - -isPredTy :: Type -> Bool -isPredTy (NoteTy _ ty) = isPredTy ty -isPredTy (PredTy sty) = True -isPredTy _ = False \end{code}