diff options
author | Manuel M T Chakravarty <chak@cse.unsw.edu.au> | 2006-09-20 18:35:34 +0000 |
---|---|---|
committer | Manuel M T Chakravarty <chak@cse.unsw.edu.au> | 2006-09-20 18:35:34 +0000 |
commit | 80c89b80c355b2aaebcd53330e6c6170c3f05aca (patch) | |
tree | a4e84a1a0cb7d6cd3e39dcee79d5889507488cf4 /compiler/prelude | |
parent | a4572b40a9668d949b906c000e40d65ca9dc2798 (diff) | |
download | haskell-80c89b80c355b2aaebcd53330e6c6170c3f05aca.tar.gz |
Extend TyCons and DataCons to represent data instance decls
Mon Sep 18 19:05:18 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au>
* Extend TyCons and DataCons to represent data instance decls
Fri Aug 18 19:11:37 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au>
* Extend TyCons and DataCons to represent data instance decls
- This is a faily involved patch, but it is not entirely complete:
+ The data con wrapper code for instance data cons needs to apply the
coercions (which we still have to generate).
+ There are still bugs, but it doesn't seem to affect the compilation of
code that doesn't use type families.
** WARNING: Yet another change of the iface format. **
** Recompile everything. **
Diffstat (limited to 'compiler/prelude')
-rw-r--r-- | compiler/prelude/TysWiredIn.lhs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/prelude/TysWiredIn.lhs b/compiler/prelude/TysWiredIn.lhs index e713eb719c..db80d3cbf0 100644 --- a/compiler/prelude/TysWiredIn.lhs +++ b/compiler/prelude/TysWiredIn.lhs @@ -67,7 +67,8 @@ import OccName ( mkOccNameFS, tcName, dataName, mkTupleOcc, import DataCon ( DataCon, mkDataCon, dataConWorkId, dataConSourceArity ) import Var ( TyVar, tyVarKind ) import TyCon ( TyCon, AlgTyConRhs(DataTyCon), tyConDataCons, - mkTupleTyCon, mkAlgTyCon, tyConName ) + mkTupleTyCon, mkAlgTyCon, tyConName, + AlgTyConParent(NoParentTyCon) ) import BasicTypes ( Arity, RecFlag(..), Boxity(..), isBoxed, StrictnessMark(..) ) @@ -204,6 +205,7 @@ pcTyCon is_enum is_rec name tyvars cons [] -- No stupid theta (DataTyCon cons is_enum) [] -- No record selectors + NoParentTyCon is_rec True -- All the wired-in tycons have generics False -- Not in GADT syntax @@ -230,6 +232,7 @@ pcDataConWithFixity declared_infix dc_name tyvars arg_tys tycon [] -- No equality spec [] -- No theta arg_tys tycon + Nothing -- not a data instance [] -- No stupid theta (mkDataConIds bogus_wrap_name wrk_name data_con) |