projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
844fa86
)
Add explicit eta-reduction to GHCI's schemeE such that deriving Typeable won't panick.
author
audreyt@audreyt.org
<unknown>
Sat, 23 Sep 2006 05:09:29 +0000
(
05:09
+0000)
committer
audreyt@audreyt.org
<unknown>
Sat, 23 Sep 2006 05:09:29 +0000
(
05:09
+0000)
compiler/ghci/ByteCodeGen.lhs
patch
|
blob
|
history
diff --git
a/compiler/ghci/ByteCodeGen.lhs
b/compiler/ghci/ByteCodeGen.lhs
index
db4e18c
..
69fc148
100644
(file)
--- 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
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))
schemeE d s p other
= pprPanic "ByteCodeGen.schemeE: unhandled case"
(pprCoreExpr (deAnnotate' other))