Commit 30fdf86e authored by Sergei Trofimovich's avatar Sergei Trofimovich Committed by Austin Seipp
Browse files

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: default avatarSergei Trofimovich <siarheit@google.com>

Reviewers: simonmar, austin, scpmw

Reviewed By: scpmw

Subscribers: carter, thomie

Differential Revision: https://phabricator.haskell.org/D580
parent 089222c9
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment