summaryrefslogtreecommitdiff
path: root/compiler/deSugar/DsCCall.lhs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2011-04-19 11:06:20 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2011-04-19 11:06:20 +0100
commitfdf8656855d26105ff36bdd24d41827b05037b91 (patch)
treefbbaeb08132051cde17ec7c3020cb835b04b947e /compiler/deSugar/DsCCall.lhs
parenta52ff7619e8b7d74a9d933d922eeea49f580bca8 (diff)
downloadhaskell-fdf8656855d26105ff36bdd24d41827b05037b91.tar.gz
This BIG PATCH contains most of the work for the New Coercion Representation
See the paper "Practical aspects of evidence based compilation in System FC" * Coercion becomes a data type, distinct from Type * Coercions become value-level things, rather than type-level things, (although the value is zero bits wide, like the State token) A consequence is that a coerion abstraction increases the arity by 1 (just like a dictionary abstraction) * There is a new constructor in CoreExpr, namely Coercion, to inject coercions into terms
Diffstat (limited to 'compiler/deSugar/DsCCall.lhs')
-rw-r--r--compiler/deSugar/DsCCall.lhs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/deSugar/DsCCall.lhs b/compiler/deSugar/DsCCall.lhs
index f46d99e504..58ebc26b2b 100644
--- a/compiler/deSugar/DsCCall.lhs
+++ b/compiler/deSugar/DsCCall.lhs
@@ -273,7 +273,7 @@ boxResult result_ty
; let io_data_con = head (tyConDataCons io_tycon)
toIOCon = dataConWrapId io_data_con
- wrap the_call = mkCoerceI (mkSymCoI co) $
+ wrap the_call = mkCoerce (mkSymCo co) $
mkApps (Var toIOCon)
[ Type io_res_ty,
Lam state_id $
@@ -372,7 +372,7 @@ resultWrapper result_ty
-- Recursive newtypes
| Just (rep_ty, co) <- splitNewTypeRepCo_maybe result_ty
= do (maybe_ty, wrapper) <- resultWrapper rep_ty
- return (maybe_ty, \e -> mkCoerce (mkSymCoercion co) (wrapper e))
+ return (maybe_ty, \e -> mkCoerce (mkSymCo co) (wrapper e))
-- The type might contain foralls (eg. for dummy type arguments,
-- referring to 'Ptr a' is legal).