RE: confusing error message
Good point. Error message improved, regression test added. Thanks for the suggestion Simon | -Original Message- | From: Dean Herington [mailto:[EMAIL PROTECTED]] | Sent: 05 February 2003 19:14 | To: [EMAIL PROTECTED] | Subject: confusing error message | | buzzard(118)% cat Bug5.hs | import Control.Monad.State | data S = S Int | newtype M a = M (StateT S IO a) | deriving (Monad) | | main = return () | buzzard(119)% ghc -c Bug5.hs | | Bug5.hs:3: | Can't make a derived instance of `Monad M' | (too hard for cunning newtype deriving) | When deriving instances for type `M' | buzzard(120)% ghc --version | The Glorious Glasgow Haskell Compilation System, version 5.04.2 | | | The real problem above is that I forgot to enable extensions. It would | be helpful if the error message indicated that as the problem. | | | ___ | 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
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
biographical profiling bug
In a fairly recent CVS (I don't have 5.04* easily available to check it): igloo@userpc15:bug$ ghc --make Foo -o Foo -prof -auto-all -O Chasing modules from: Foo Compiling Inflate ( Inflate.lhs, ./Inflate.o ) Compiling Main ( Foo.lhs, ./Foo.o ) Linking ... igloo@userpc15:bug$ ./Foo +RTS -hb Foo: internal error: Invalid object in processHeapClosureForDead(): 17260 Please report this as a bug to [EMAIL PROTECTED], or http://www.sourceforge.net/projects/ghc/ igloo@userpc15:bug$ Source at http://urchin.earth.li/~ian/bug.tar.gz Thanks Ian ___ 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
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: External Core parser bug
I've fixed this one, I believe. Simon | -Original Message- | From: Kirsten Chevalier [mailto:[EMAIL PROTECTED]] | Sent: 07 January 2003 20:27 | To: [EMAIL PROTECTED] | Subject: External Core parser bug | | The attached file was generated by running 'ghc -fext-core' on the Atom | benchmark from the spectral section of the nofib suite, but if I try to | read it back into GHC 5.04.1, I get the following error: | | 2882: Parse error | :-2::GHCziPrim.Floatzh)) | (GHCziBase.zdwZC @ GHCziFloat.Float | (GHCziFloat.zdwFzh (1.0::GHCziP | | -- | Kirsten Chevalier * [EMAIL PROTECTED] * Often in error, never in doubt ___ 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
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