Module header tidyup, phase 1
[ghc-hetmet.git] / compiler / prelude / TysPrim.lhs
index 4cb3ef7..1ec7721 100644 (file)
@@ -7,7 +7,7 @@
 module TysPrim(
        alphaTyVars, betaTyVars, alphaTyVar, betaTyVar, gammaTyVar, deltaTyVar,
        alphaTy, betaTy, gammaTy, deltaTy,
-       openAlphaTy, openAlphaTyVar, openAlphaTyVars,
+       openAlphaTy, openBetaTy, openAlphaTyVar, openBetaTyVar, openAlphaTyVars,
 
        primTyCons,
 
@@ -50,7 +50,7 @@ import OccName                ( mkOccNameFS, tcName, mkTyVarOcc )
 import TyCon           ( TyCon, mkPrimTyCon, mkLiftedPrimTyCon,
                          PrimRep(..) )
 import Type            ( mkTyConApp, mkTyConTy, mkTyVarTys, mkTyVarTy,
-                         unliftedTypeKind, unboxedTypeKind, 
+                         unliftedTypeKind, 
                          liftedTypeKind, openTypeKind, 
                          Kind, mkArrowKinds,
                          TyThing(..)
@@ -103,7 +103,6 @@ mkPrimTc :: FastString -> Unique -> TyCon -> Name
 mkPrimTc fs uniq tycon
   = mkWiredInName gHC_PRIM (mkOccNameFS tcName fs) 
                  uniq
-                 Nothing               -- No parent object
                  (ATyCon tycon)        -- Relevant TyCon
                  UserSyntax            -- None are built-in syntax
 
@@ -168,9 +167,10 @@ alphaTys = mkTyVarTys alphaTyVars
        -- to a lifted or unlifted type variable.  It's used for the 
        -- result type for "error", so that we can have (error Int# "Help")
 openAlphaTyVars :: [TyVar]
-openAlphaTyVars@(openAlphaTyVar:_) = tyVarList openTypeKind
+openAlphaTyVars@(openAlphaTyVar:openBetaTyVar:_) = tyVarList openTypeKind
 
 openAlphaTy = mkTyVarTy openAlphaTyVar
+openBetaTy   = mkTyVarTy openBetaTyVar
 \end{code}
 
 
@@ -187,17 +187,13 @@ pcPrimTyCon name arity rep
   = mkPrimTyCon name kind arity rep
   where
     kind        = mkArrowKinds (replicate arity liftedTypeKind) result_kind
-    result_kind = case rep of 
-                   PtrRep -> unliftedTypeKind
-                   _other -> unboxedTypeKind
+    result_kind = unliftedTypeKind
 
 pcPrimTyCon0 :: Name -> PrimRep -> TyCon
 pcPrimTyCon0 name rep
   = mkPrimTyCon name result_kind 0 rep
   where
-    result_kind = case rep of 
-                   PtrRep -> unliftedTypeKind
-                   _other -> unboxedTypeKind
+    result_kind = unliftedTypeKind
 
 charPrimTy     = mkTyConTy charPrimTyCon
 charPrimTyCon  = pcPrimTyCon0 charPrimTyConName WordRep