Skip to content

"derive instance" panics ghc-6.7.20070404

I've been happy to see the support for "dervice instance". In the past I've had to make a copy of parsec, just to dervice Data and Typeable for the Pos type in order to do SYB on my AST.

Unfortunately "dervive instance" panics the 6.7 compiler at the moment (I need/want 6.7 since the -fhpc support rocks!).

> import Text.ParserCombinators.Parsec.Pos as PPos
> ...
> derive instance Data PPos.SourcePos

This produces:

TLACodeGen.hs:485:0:ghc-6.7.20070404: panic! (the 'impossible' happened)
  (GHC version 6.7.20070404 for powerpc-apple-darwin):
        newTyConRhs
    main:Text.ParserCombinators.Parsec.Pos.SourcePos{tc r1R}

Details of my system:

yoghurt:~/sdev/specifica/australis reto$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.7.20070404

yoghurt:~/sdev/specifica/australis reto$ uname -a
Darwin yoghurt.local 8.8.0 Darwin Kernel Version 8.8.0: Fri Sep  8 17:18:57 PDT 2006; root:xnu-792.12.6.obj~1/RELEASE_PPC Power Macintosh powerpc

yoghurt:~/sdev/specifica/australis reto$ gcc -v 
Reading specs from /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/specs
Configured with: /private/var/tmp/gcc/gcc-4061.obj~8/src/configure --disable-checking --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^+.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/gcc/darwin/4.0/c++ --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.0 20041026 (Apple Computer, Inc. build 4061)
Edited by Simon Peyton Jones
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information