From: audreyt@audreyt.org Date: Sat, 23 Sep 2006 05:09:29 +0000 (+0000) Subject: Add explicit eta-reduction to GHCI's schemeE such that deriving Typeable won't panick. X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=e2b2c4b9920dd7ca74c9e62640647c78848b162c;p=ghc-hetmet.git Add explicit eta-reduction to GHCI's schemeE such that deriving Typeable won't panick. --- diff --git a/compiler/ghci/ByteCodeGen.lhs b/compiler/ghci/ByteCodeGen.lhs index db4e18c..69fc148 100644 --- a/compiler/ghci/ByteCodeGen.lhs +++ b/compiler/ghci/ByteCodeGen.lhs @@ -427,6 +427,13 @@ schemeE d s p (AnnNote note (_, body)) schemeE d s p (AnnCast (_, body) _) = schemeE d s p body +-- XXX - audreyt - After FC landed, this case of explicit eta-reduction +-- seems needed to make "data D = D deriving Typeable" work in GHCi. +-- however, how did AnnLam with a var (LocalId) survive until this place? +schemeE d s p (AnnLam var (_, AnnApp (_, body) (_, AnnVar inner))) + | var == inner + = schemeE d s p body + schemeE d s p other = pprPanic "ByteCodeGen.schemeE: unhandled case" (pprCoreExpr (deAnnotate' other))