Commit ba2843ab authored by ralf's avatar ralf
Browse files

[project @ 2003-07-24 12:19:56 by ralf]

Major refactoring of Data/Generics.
This also affects the compiler (because of deriving issues).
This is an intermediate commit.
The library is supposed to compile fine.
But the deriving stuff for Data needs to be revised.
The testsuite for Data/Generics will not pass.
gread is broken at the moment.
So it is strongly recommended not to cvs upd for a few hours or a day.

Detailed description of changes:
- Split up Data/Dynamic into Data/Typeable and Data/Dynamic.
  (This makes clear what part is about TypeReps and cast vs.
   dynamics. The latter is not needed by Data/Generics.)
- Renamed Data/include/Dynamic.h -> Typeable.h to end confusion.
- Split up Data/Generics.hs in a set of modules.
- Revised class Data:
  - Got rid of gunfold but added fromConstr as more primtive one
  - Revised representations of constructors
  - Revised treatment of primitive types
- Revised type of gmapQ; preserved old gmapQ as gmapL
- Added a module Data/Types.hs for treatment of types as values.

This is going somewhere.
parent 75e54308
......@@ -267,7 +267,7 @@ pREL_FLOAT_Name = mkModuleName "GHC.Float"
pREL_TOP_HANDLER_Name = mkModuleName "GHC.TopHandler"
sYSTEM_IO_Name = mkModuleName "System.IO"
dYNAMIC_Name = mkModuleName "Data.Dynamic"
tRAVERSE_Name = mkModuleName "Data.Traverse"
tYPEABLE_Name = mkModuleName "Data.Typeable"
gENERICS_Name = mkModuleName "Data.Generics"
dOTNET_Name = mkModuleName "GHC.Dotnet"
......@@ -445,9 +445,9 @@ showString_RDR = varQual_RDR pREL_SHOW_Name FSLIT("showString")
showSpace_RDR = varQual_RDR pREL_SHOW_Name FSLIT("showSpace")
showParen_RDR = varQual_RDR pREL_SHOW_Name FSLIT("showParen")
typeOf_RDR = varQual_RDR dYNAMIC_Name FSLIT("typeOf")
mkTypeRep_RDR = varQual_RDR dYNAMIC_Name FSLIT("mkAppTy")
mkTyConRep_RDR = varQual_RDR dYNAMIC_Name FSLIT("mkTyCon")
typeOf_RDR = varQual_RDR tYPEABLE_Name FSLIT("typeOf")
mkTypeRep_RDR = varQual_RDR tYPEABLE_Name FSLIT("mkAppTy")
mkTyConRep_RDR = varQual_RDR tYPEABLE_Name FSLIT("mkTyCon")
constr_RDR = dataQual_RDR gENERICS_Name FSLIT("Constr")
gfoldl_RDR = varQual_RDR gENERICS_Name FSLIT("gfoldl")
......@@ -618,7 +618,7 @@ realFloatClassName = clsQual pREL_FLOAT_Name FSLIT("RealFloat") realFloatClassK
ixClassName = clsQual pREL_ARR_Name FSLIT("Ix") ixClassKey
-- Class Typeable and Data
typeableClassName = clsQual dYNAMIC_Name FSLIT("Typeable") typeableClassKey
typeableClassName = clsQual tYPEABLE_Name FSLIT("Typeable") typeableClassKey
dataClassName = clsQual gENERICS_Name FSLIT("Data") dataClassKey
-- Enum module (Enum, Bounded)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment