The boot interface files for TypeRep contain errors

2003-02-06 Thread Tobias Gedell
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
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


RE: The boot interface files for TypeRep contain errors

2003-02-06 Thread Simon Peyton-Jones
Urk!  Good point!

Yes, please do commit those changes. Do you have commit permission now?

Simon

| -Original Message-
| From: Tobias Gedell [mailto:[EMAIL PROTECTED]]
| 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
| [EMAIL PROTECTED]
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



Re: The boot interface files for TypeRep contain errors

2003-02-06 Thread Tobias Gedell
Urk!  Good point!

Yes, please do commit those changes. Do you have commit permission now?


Yes, I have commit permission now, thanks!

I had troubles commiting at first but then I ran cvs update -A and 
then cvs commit filenames. I hope that was the right way to do it.



//Tobias


___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs