summaryrefslogtreecommitdiff
path: root/compiler/stranal
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-07-20 23:34:31 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2015-07-21 13:21:30 +0100
commit8f48fdc8f97c1f6f59e12a703e380d27760810b1 (patch)
treef2a52ec7174a3352d8c3eb48d7fb55b65bdb5b2f /compiler/stranal
parente0a3c441412923bb8b422281cf2e0f8f2841d6c1 (diff)
downloadhaskell-8f48fdc8f97c1f6f59e12a703e380d27760810b1.tar.gz
Use varToCoreExpr in mkWWcpr_help
Lacking this cuased Trac #10658. The fix is easy; it was a simple omission.
Diffstat (limited to 'compiler/stranal')
-rw-r--r--compiler/stranal/WwLib.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/stranal/WwLib.hs b/compiler/stranal/WwLib.hs
index 304a3cbacb..b442f3d9a9 100644
--- a/compiler/stranal/WwLib.hs
+++ b/compiler/stranal/WwLib.hs
@@ -635,7 +635,9 @@ mkWWcpr_help (data_con, inst_tys, arg_tys, co)
; return ( True
, \ wkr_call -> Case wkr_call arg (exprType con_app) [(DEFAULT, [], con_app)]
- , \ body -> mkUnpackCase body co work_uniq data_con [arg] (Var arg)
+ , \ body -> mkUnpackCase body co work_uniq data_con [arg] (varToCoreExpr arg)
+ -- varToCoreExpr important here: arg can be a coercion
+ -- Lacking this caused Trac #10658
, arg_ty1 ) }
| otherwise -- The general case