|
RE: The boot interface files for TypeRep contain errors: msg#00026lang.haskell.glasgow.bugs
Urk! Good point! Yes, please do commit those changes. Do you have commit permission now? Simon | -----Original Message----- | From: Tobias Gedell [mailto:d99getob@xxxxxxxxxxxxxxxx] | Sent: 06 February 2003 13:14 | To: glasgow-haskell-bugs | Subject: The boot interface files for TypeRep contain errors | | The boot interface files for .../ghc/compiler/types/TypeRep.lhs contain | errors. | | | In TypeRep.lhs PredType is defined as: | | ----- | type PredType = SourceType -- A subtype for predicates | ----- | | | But in the boot files it is exported as a datatype (taken from | TypeRep.hi-boot-6): | | ----- | module TypeRep where | | data Type | data PredType | type Kind = Type | type SuperKind = Type | ----- | | When compiling GHC this doesn't matter, the compilation succeeds anyway. | The error shows up first when generating external Core for GHC. Since | PredType is exported as a datatype it will be refered to by all modules | that are using the boot file, but when generating external Core for | TypeRep the type PredType will be removed since it is just an alias. | Therefore there will be a lot of references to the nonexisting type | TypeRep.PredType. | | | The solution is to define PredType as a type in the boot files and add | the type SourceType as a datatype. | | | Here are the modified boot files: | | TypeRep.hi-boot: | ----- | _interface_ TypeRep 1 | _exports_ TypeRep Type SourceType PredType Kind SuperKind ; | _declarations_ | 1 data Type ; | 1 data SourceType ; | 1 type PredType = SourceType; | 1 type Kind = Type ; | 1 type SuperKind = Type ; | ----- | | | TypeRep.hi-boot-5 | ----- | __interface TypeRep 1 0 where | __export TypeRep Type SourceType PredType Kind SuperKind ; | 1 data Type ; | 1 data SourceType ; | 1 type PredType = SourceType ; | 1 type Kind = Type ; | 1 type SuperKind = Type ; | ----- | | | TypeRep.hi-boot-6 | ----- | module TypeRep where | | data Type | data SourceType | type PredType = SourceType | type Kind = Type | type SuperKind = Type | ----- | | | | Should I commit these changes to the HEAD branch? | | | | Regards, | Tobias | | _______________________________________________ | Glasgow-haskell-bugs mailing list | Glasgow-haskell-bugs@xxxxxxxxxxx | http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | biographical profiling bug, Ian Lynagh |
|---|---|
| Next by Date: | RE: External Core parser bug, Simon Peyton-Jones |
| Previous by Thread: | The boot interface files for TypeRep contain errors, Tobias Gedell |
| Next by Thread: | Re: The boot interface files for TypeRep contain errors, Tobias Gedell |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |