summaryrefslogtreecommitdiff
path: root/compiler/deSugar/DsCCall.lhs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2014-08-01 16:56:10 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2014-08-07 09:55:15 +0100
commit1fc60ea1f1fd89b90c2992d060aecb5b5a65f8c0 (patch)
tree3e6b0373b644c6f39a44275495041633f2a000d9 /compiler/deSugar/DsCCall.lhs
parent1736082115ad3be9a7d1dcc2f412c5ca60f2cfe3 (diff)
downloadhaskell-1fc60ea1f1fd89b90c2992d060aecb5b5a65f8c0.tar.gz
When desugaring Use the smart mkCoreConApps and friends
This is actually the bug that triggered Trac #9390. We had an unboxed tuple (# writeArray# ..., () #), and that writeArray# argument isn't ok-for-speculation, so disobeys the invariant. The desugaring of unboxed tuples was to blame; the fix is easy.
Diffstat (limited to 'compiler/deSugar/DsCCall.lhs')
-rw-r--r--compiler/deSugar/DsCCall.lhs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/deSugar/DsCCall.lhs b/compiler/deSugar/DsCCall.lhs
index 217a4ce7c9..a47b9ea4dd 100644
--- a/compiler/deSugar/DsCCall.lhs
+++ b/compiler/deSugar/DsCCall.lhs
@@ -238,9 +238,9 @@ boxResult result_ty
_ -> []
return_result state anss
- = mkConApp (tupleCon UnboxedTuple (2 + length extra_result_tys))
- (map Type (realWorldStatePrimTy : io_res_ty : extra_result_tys)
- ++ (state : anss))
+ = mkCoreConApps (tupleCon UnboxedTuple (2 + length extra_result_tys))
+ (map Type (realWorldStatePrimTy : io_res_ty : extra_result_tys)
+ ++ (state : anss))
; (ccall_res_ty, the_alt) <- mk_alt return_result res