X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypes%2FTyLoop.lhi;h=ec3c65c2df16169135a81d7a5a0c88627bc2c800;hb=33c0b416327d85d06763e91cbc1de937e742d0e5;hp=a97c27d1a159a0bf08326339f79117a598603ed5;hpb=7d61cb61daa5e433a0cb85b34b7f0c58b2f961ff;p=ghc-hetmet.git diff --git a/ghc/compiler/types/TyLoop.lhi b/ghc/compiler/types/TyLoop.lhi index a97c27d..ec3c65c 100644 --- a/ghc/compiler/types/TyLoop.lhi +++ b/ghc/compiler/types/TyLoop.lhi @@ -3,19 +3,23 @@ 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 Id ( Id, GenId, StrictnessMark, mkTupleCon, mkDataCon, - dataConSig, getInstantiatedDataConSig ) +import FieldLabel ( FieldLabel ) +import Id ( Id, GenId, StrictnessMark, mkDataCon, mkTupleCon, + isNullaryDataCon, dataConArgTys, idType ) +import TysWiredIn ( tupleCon, tupleTyCon ) import PprType ( specMaybeTysSuffix ) -import NameTypes ( FullName ) +import Name ( Name ) import TyCon ( TyCon ) import TyVar ( GenTyVar, TyVar ) -import Type ( GenType, Type ) +import Type ( splitSigmaTy, splitFunTy, splitRhoTy, applyTy, GenType, Type ) import Usage ( GenUsage ) import Class ( Class, GenClass ) +import TysPrim ( voidTy ) data GenId ty data GenType tyvar uvar @@ -29,17 +33,25 @@ type Class = GenClass (GenTyVar (GenUsage Unique)) Unique type Id = GenId (GenType (GenTyVar (GenUsage Unique)) Unique) -- Needed in TyCon -mkTupleCon :: Int -> Id -dataConSig :: Id -> ([TyVar], [(Class, Type)], [Type], TyCon) -specMaybeTysSuffix :: [Maybe Type] -> _PackedString +tupleCon :: Int -> Id +isNullaryDataCon :: Id -> Bool +specMaybeTysSuffix :: [Maybe Type] -> FastString +idType :: Id -> Type +splitSigmaTy :: GenType t u -> ([t], [(Class,GenType t u)], GenType t u) +splitRhoTy :: GenType t u -> ([(Class,GenType t u)], GenType t u) +applyTy :: Type -> Type -> Type +splitFunTy :: GenType t u -> ([GenType t u], GenType t u) instance Eq (GenClass a b) -- Needed in Type -getInstantiatedDataConSig :: Id -> [Type] -> ([Type],[Type],Type) +tupleTyCon :: Int -> TyCon +dataConArgTys :: Id -> [Type] -> [Type] +voidTy :: Type -- Needed in TysWiredIn data StrictnessMark = MarkedStrict | NotMarkedStrict -mkDataCon :: Unique -> FullName -> [StrictnessMark] - -> [TyVar] -> [(Class,Type)] -> [Type] -> TyCon +mkDataCon :: Name -> [StrictnessMark] -> [FieldLabel] + -> [TyVar] -> [(Class,Type)] -> [TyVar] -> [(Class,Type)] -> [Type] -> TyCon -> Id +mkTupleCon :: Int -> Name -> Type -> Id \end{code}