On 19/04/2010 10:29, Matthias Kilian wrote:
[Warning: much confusion below ;-)]

Hi,

On Fri, Apr 09, 2010 at 04:48:05AM -0700, Ian Lynagh wrote:
Mon Mar 29 18:10:20 PDT 2010  David Waern<[email protected]>
   * Add Data and Typeable instances to HsSyn

   The instances (and deriving declarations) have been taken from the ghc-syb
   package.
[...]

This patch appears to uncover some strange problem during bootstrapping
a ghc-6.13 stage1 compiler with an existing ghc-6.12 compiler.
Initially, it lead to the famous panic involved with outdated
interface files when compiling HsExpr.lhs:

ghc: panic! (the 'impossible' happened)
   (GHC version 6.12.2 for x86_64-unknown-openbsd):
         tcIfaceGlobal (local): not found:
     ghc-6.13:HsExpr.$fxDataHsExpr{v rlX}

So I tried to just add some instance declarations to HsExpr.lhs-boot
like this:

instance Typeable i =>  Typeable (HsExpr i)
instance Typeable i =>  Typeable (HsSplice i)
instance Typeable i =>  Typeable (MatchGroup i)
instance Typeable i =>  Typeable (GRHSs i)

But now the compilation of HsExpr fails with:

compiler/hsSyn/HsExpr.lhs:1:0:
     instance (Typeable i) =>  Typeable (GRHSs i) -- Defined in HsExpr
       is defined in the hs-boot file, but not in the module itself

compiler/hsSyn/HsExpr.lhs:1:0:
     instance (Typeable i) =>  Typeable (HsExpr i) -- Defined in HsExpr
       is defined in the hs-boot file, but not in the module itself

compiler/hsSyn/HsExpr.lhs:1:0:
     instance (Typeable i) =>  Typeable (HsSplice i) -- Defined in HsExpr
       is defined in the hs-boot file, but not in the module itself

compiler/hsSyn/HsExpr.lhs:1:0:
     instance (Typeable i) =>  Typeable (MatchGroup i)
       -- Defined in HsExpr
       is defined in the hs-boot file, but not in the module itself

Maybe my Haskell knowledge is a little bit rusty (after all, I
didn't do *real* Haskell work for a long time), but shouldn't the
added derive clauses in HsSyn.lhs cause those instances to exists?

And in case I'm wrong: what's causing the panic? Is it possible
that the build pulls in the wrong .hi file (from the ghc-6.12
installation)?

The panic is obviously a bug, but it's not clear whether it is a bug in the build system (a missing dependency) or in GHC. Can you give us instructions to reproduce?

Cheers,
        Simon

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to