diff options
author | Sergei Trofimovich <siarheit@google.com> | 2014-12-23 08:55:06 -0600 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-12-23 08:55:07 -0600 |
commit | 30fdf86eec34711be07c6771b02a6fc81ac99ee2 (patch) | |
tree | 70bcf90ec274fffe2a8b362df4f0241de0825803 | |
parent | 089222c9d6798c79179264e5c77c31d5c460a880 (diff) | |
download | haskell-30fdf86eec34711be07c6771b02a6fc81ac99ee2.tar.gz |
dwarf: sync getIdFromTrivialExpr with exprIsTrivial (test break028 and others)
Summary:
The bug manifests when built with
EXTRA_HC_OPTS += -g
+++ ./ghci.debugger/scripts/break028.run.stderr 2014-12-19 23:08:46.199876621 +0000
@@ -0,0 +1,11 @@
+ghc-stage2: panic! (the 'impossible' happened)
+ (GHC version 7.9.20141219 for x86_64-unknown-linux):
+ getIdFromTrivialExpr x_alJ
+
+Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
+
+
+<interactive>:3:1: Not in scope: ‘g’
+
+<interactive>:3:3: Not in scope: data constructor ‘False’
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
Reviewers: simonmar, austin, scpmw
Reviewed By: scpmw
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D580
-rw-r--r-- | compiler/coreSyn/CoreUtils.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/coreSyn/CoreUtils.hs b/compiler/coreSyn/CoreUtils.hs index c5200294da..913dda3ad5 100644 --- a/compiler/coreSyn/CoreUtils.hs +++ b/compiler/coreSyn/CoreUtils.hs @@ -663,6 +663,7 @@ getIdFromTrivialExpr :: CoreExpr -> Id getIdFromTrivialExpr e = go e where go (Var v) = v go (App f t) | not (isRuntimeArg t) = go f + go (Tick t e) | not (tickishIsCode t) = go e go (Cast e _) = go e go (Lam b e) | not (isRuntimeVar b) = go e go e = pprPanic "getIdFromTrivialExpr" (ppr e) |