X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fiface%2FIfaceType.lhs;h=84c71ffcd3f71a833e79f3174489a1f78ed533e5;hb=a8427a4125e9b78e88a487eeabf018f1c6e8bc08;hp=64d88927f6f9837c71b2661eaa55d3af51e67ea8;hpb=b00b5bc04ff36a551552470060064f0b7d84ca30;p=ghc-hetmet.git diff --git a/compiler/iface/IfaceType.lhs b/compiler/iface/IfaceType.lhs index 64d8892..84c71ff 100644 --- a/compiler/iface/IfaceType.lhs +++ b/compiler/iface/IfaceType.lhs @@ -1,8 +1,9 @@ % +% (c) The University of Glasgow 2006 % (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 % - This module defines interface types and binders +This module defines interface types and binders \begin{code} module IfaceType ( @@ -24,18 +25,12 @@ module IfaceType ( #include "HsVersions.h" -import TypeRep ( TyThing(..), Type(..), PredType(..), ThetaType, - unliftedTypeKindTyConName, openTypeKindTyConName, - ubxTupleKindTyConName, argTypeKindTyConName, - liftedTypeKindTyConName ) -import TyCon ( TyCon, isTupleTyCon, tyConArity, tupleTyConBoxity, tyConName ) -import Var ( isId, tyVarKind, idType ) -import TysWiredIn ( listTyConName, parrTyConName, tupleTyCon, intTyConName, charTyConName, boolTyConName ) -import OccName ( OccName, parenSymOcc, occNameFS ) -import Name ( Name, getName, getOccName, nameModule, nameOccName, - wiredInNameTyThing_maybe ) -import Module ( Module, ModuleName ) -import BasicTypes ( IPName(..), Arity, Version, mapIPName, tupleParens, Boxity ) +import TypeRep +import TyCon +import Var +import TysWiredIn +import Name +import BasicTypes import Outputable import FastString \end{code} @@ -55,8 +50,7 @@ type IfaceIdBndr = (FastString, IfaceType) type IfaceTvBndr = (FastString, IfaceKind) ------------------------------- -type IfaceKind = IfaceType -- Re-use the Kind type, but no KindVars in it - +type IfaceKind = IfaceType type IfaceCoercion = IfaceType data IfaceType @@ -84,6 +78,7 @@ data IfaceTyCon -- Abbreviations for common tycons with known names | IfaceTupTc Boxity Arity | IfaceLiftedTypeKindTc | IfaceOpenTypeKindTc | IfaceUnliftedTypeKindTc | IfaceUbxTupleKindTc | IfaceArgTypeKindTc + deriving( Eq ) ifaceTyConName :: IfaceTyCon -> Name ifaceTyConName IfaceIntTc = intTyConName @@ -181,14 +176,7 @@ pprIfaceTvBndrs tyvars = hsep (map pprIfaceTvBndr tyvars) \begin{code} --------------------------------- instance Outputable IfaceType where - ppr ty = pprIfaceTypeForUser ty - -pprIfaceTypeForUser ::IfaceType -> SDoc --- Drop top-level for-alls; if that's not what you want, use pprIfaceType dire -pprIfaceTypeForUser ty - = pprIfaceForAllPart [] theta (pprIfaceType tau) - where - (_tvs, theta, tau) = splitIfaceSigmaTy ty + ppr ty = pprIfaceType ty pprIfaceType, pprParendIfaceType ::IfaceType -> SDoc pprIfaceType = ppr_ty tOP_PREC