X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypes%2FTyLoop.lhi;h=267140fd1b360bd49ebbbdc75ebd5eb7e71a77cd;hb=ec8dac9d4d011593623c99380858ceedd36f5139;hp=9fb866fcad27ec5c9039bb20e2b609391346c6af;hpb=ae45ff0e9831a0dc862a5d68d03e355d7e323c62;p=ghc-hetmet.git diff --git a/ghc/compiler/types/TyLoop.lhi b/ghc/compiler/types/TyLoop.lhi index 9fb866f..267140f 100644 --- a/ghc/compiler/types/TyLoop.lhi +++ b/ghc/compiler/types/TyLoop.lhi @@ -3,18 +3,20 @@ Breaks the TyCon/types loop and the types/Id loop. \begin{code} interface TyLoop where -import PreludePS(_PackedString) +--import PreludePS(_PackedString) +import FastString (FastString) import PreludeStdIO ( Maybe ) import Unique ( Unique ) import FieldLabel ( FieldLabel ) -import Id ( Id, GenId, StrictnessMark, mkTupleCon, mkDataCon, - isNullaryDataCon, dataConArgTys ) +import Id ( Id, GenId, StrictnessMark, mkDataCon, mkTupleCon, + isNullaryDataCon, dataConArgTys, idType ) +import TysWiredIn ( tupleCon, tupleTyCon ) import PprType ( specMaybeTysSuffix ) import Name ( Name ) import TyCon ( TyCon ) import TyVar ( GenTyVar, TyVar ) -import Type ( GenType, Type ) +import Type ( splitSigmaTy, splitFunTy, GenType, Type ) import Usage ( GenUsage ) import Class ( Class, GenClass ) import TysPrim ( voidTy ) @@ -31,12 +33,16 @@ type Class = GenClass (GenTyVar (GenUsage Unique)) Unique type Id = GenId (GenType (GenTyVar (GenUsage Unique)) Unique) -- Needed in TyCon -mkTupleCon :: Int -> Id +tupleCon :: Int -> Id isNullaryDataCon :: Id -> Bool -specMaybeTysSuffix :: [Maybe Type] -> _PackedString +specMaybeTysSuffix :: [Maybe Type] -> FastString +idType :: Id -> Type +splitSigmaTy :: GenType t u -> ([t], [(Class,GenType t u)], GenType t u) +splitFunTy :: GenType t u -> ([GenType t u], GenType t u) instance Eq (GenClass a b) -- Needed in Type +tupleTyCon :: Int -> TyCon dataConArgTys :: Id -> [Type] -> [Type] voidTy :: Type @@ -45,4 +51,5 @@ data StrictnessMark = MarkedStrict | NotMarkedStrict mkDataCon :: Name -> [StrictnessMark] -> [FieldLabel] -> [TyVar] -> [(Class,Type)] -> [Type] -> TyCon -> Id +mkTupleCon :: Int -> Name -> Type -> Id \end{code}