[project @ 2005-11-02 17:41:00 by simonpj]
[ghc-hetmet.git] / ghc / compiler / prelude / TysWiredIn.lhs
index eb8124f..e7dea60 100644 (file)
@@ -21,9 +21,9 @@ module TysWiredIn (
        charTy, stringTy, charTyConName,
 
        
-       doubleTyCon, doubleDataCon, doubleTy,
+       doubleTyCon, doubleDataCon, doubleTy, doubleTyConName, 
        
-       floatTyCon, floatDataCon, floatTy,
+       floatTyCon, floatDataCon, floatTy, floatTyConName,
 
        intTyCon, intDataCon, intTyCon_RDR, intDataCon_RDR, intTyConName,
        intTy,
@@ -69,15 +69,12 @@ import TyCon                ( TyCon, AlgTyConRhs(DataTyCon), tyConDataCons,
                          mkTupleTyCon, mkAlgTyCon, tyConName
                        )
 
-import BasicTypes      ( Arity, RecFlag(..), Boxity(..), isBoxed, StrictnessMark(..),
-                         Fixity(..), FixityDirection(..), defaultFixity )
+import BasicTypes      ( Arity, RecFlag(..), Boxity(..), isBoxed, StrictnessMark(..) )
 
-import Type            ( Type, mkTyConTy, mkTyConApp, mkTyVarTy, mkTyVarTys, 
-                         ThetaType, TyThing(..) )
+import Type            ( Type, mkTyConTy, mkTyConApp, mkTyVarTy, mkTyVarTys, TyThing(..) )
 import Kind            ( mkArrowKinds, liftedTypeKind, ubxTupleKind )
 import Unique          ( incrUnique, mkTupleTyConUnique,
                          mkTupleDataConUnique, mkPArrDataConUnique )
-import PrelNames
 import Array
 import FastString
 import Outputable
@@ -177,10 +174,10 @@ pcTyCon is_enum is_rec name tyvars argvrcs cons
     tycon = mkAlgTyCon name
                (mkArrowKinds (map tyVarKind tyvars) liftedTypeKind)
                 tyvars
-                []              -- No context
                 argvrcs
-                (DataTyCon cons is_enum)
-               []              -- No record selectors
+                []             -- No stupid theta
+               (DataTyCon cons is_enum)
+               []              -- No record selectors
                 is_rec
                True            -- All the wired-in tycons have generics
 
@@ -198,11 +195,12 @@ pcDataConWithFixity :: Bool -> Name -> [TyVar] -> [Type] -> TyCon -> DataCon
 pcDataConWithFixity declared_infix dc_name tyvars arg_tys tycon
   = data_con
   where
-    data_con = mkDataCon dc_name declared_infix
+    data_con = mkDataCon dc_name declared_infix True {- Vanilla -}
                 (map (const NotMarkedStrict) arg_tys)
                 [{- No labelled fields -}]
-                tyvars [] [] [] arg_tys tycon 
+                tyvars [] [] arg_tys tycon (mkTyVarTys tyvars)
                (mkDataConIds bogus_wrap_name wrk_name data_con)
+               
 
     mod      = nameModule dc_name
     wrk_occ  = mkDataConWorkerOcc (nameOccName dc_name)
@@ -487,7 +485,7 @@ mkPArrTy ty  = mkTyConApp parrTyCon [ty]
 
 -- represents the type constructor of parallel arrays
 --
--- * this must match the definition in `PrelPArr'
+--  * this must match the definition in `PrelPArr'
 --
 -- NB: Although the constructor is given here, it will not be accessible in
 --     user code as it is not in the environment of any compiled module except
@@ -513,7 +511,7 @@ isPArrTyCon tc  = tyConName tc == parrTyConName
 
 -- fake array constructors
 --
--- * these constructors are never really used to represent array values;
+--  * these constructors are never really used to represent array values;
 --   however, they are very convenient during desugaring (and, in particular,
 --   in the pattern matching compiler) to treat array pattern just like
 --   yet another constructor pattern