From e2b2c4b9920dd7ca74c9e62640647c78848b162c Mon Sep 17 00:00:00 2001 From: "audreyt@audreyt.org" Date: Sat, 23 Sep 2006 05:09:29 +0000 Subject: [PATCH] Add explicit eta-reduction to GHCI's schemeE such that deriving Typeable won't panick. --- compiler/ghci/ByteCodeGen.lhs | 7 +++++++ 1 file changed, 7 insertions(+) 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)) -- 1.7.10.4