[commit: ghc] : Fix scrutination of cast data with Simon's new dealWithCoercion function (80a02e5)

Max Bolingbroke <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : 

http://hackage.haskell.org/trac/ghc/changeset/80a02e5d68affe1e5b090761225b9be597bc3c99

>---------------------------------------------------------------

commit 80a02e5d68affe1e5b090761225b9be597bc3c99
Author: Max Bolingbroke <[email protected]>
Date:   Wed Jul 27 15:40:58 2011 +0100

    Fix scrutination of cast data with Simon's new dealWithCoercion function

>---------------------------------------------------------------

 .../Supercompile/Evaluator/Evaluate.hs             |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/compiler/supercompile/Supercompile/Evaluator/Evaluate.hs b/compiler/supercompile/Supercompile/Evaluator/Evaluate.hs
index ccd8d86..ed88d68 100644
--- a/compiler/supercompile/Supercompile/Evaluator/Evaluate.hs
+++ b/compiler/supercompile/Supercompile/Evaluator/Evaluate.hs
@@ -226,9 +226,9 @@ step' normalising state =
                                         
                                             -- Make the "theta" from Fig 3 of the paper
                                             gammas = decomposeCo tc_arity co'
-                                            theta  = zipOpenCvSubst (dc_univ_tyvars ++ dc_ex_tyvars)
-                                                                    (gammas         ++ map mkReflCo tys)
-                                        in map (\arg_ty -> (liftCoSubst theta arg_ty, tg_co)) arg_tys -- Use tag from the original coercion everywhere
+                                            theta_subst = liftCoSubstWith (dc_univ_tyvars ++ dc_ex_tyvars)
+                                                                          (gammas         ++ map mkReflCo tys)
+                                        in map (\arg_ty -> (theta_subst arg_ty, tg_co)) arg_tys -- Use tag from the original coercion everywhere
            -- b) Identify the first appropriate branch of the case and reduce -- apply the discovered coercions if necessary
           , (deeds3, h', ids', alt_e):_ <- [ res
                                            | ((DataAlt alt_dc alt_as alt_xs, alt_e), rest) <- bagContexts alts
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.