[commit: ghc] master: Coercions can be hashed just fine (5c0f947)
Simon Peyton Jones
simonpj at microsoft.com
Wed Jul 20 11:16:22 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/5c0f947b3081055d9ca6b275626c94d9dc49c2e0
>---------------------------------------------------------------
commit 5c0f947b3081055d9ca6b275626c94d9dc49c2e0
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Jul 20 08:43:23 2011 +0100
Coercions can be hashed just fine
>---------------------------------------------------------------
compiler/coreSyn/CoreUtils.lhs | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/compiler/coreSyn/CoreUtils.lhs b/compiler/coreSyn/CoreUtils.lhs
index ea0ebfe..0eb3495 100644
--- a/compiler/coreSyn/CoreUtils.lhs
+++ b/compiler/coreSyn/CoreUtils.lhs
@@ -1229,10 +1229,10 @@ hash_expr env (Let (NonRec b r) e) = hash_expr (extend_env env b) e * fast_ha
hash_expr env (Let (Rec ((b,_):_)) e) = hash_expr (extend_env env b) e
hash_expr env (Case e _ _ _) = hash_expr env e
hash_expr env (Lam b e) = hash_expr (extend_env env b) e
+hash_expr env (Coercion co) = fast_hash_co env co
hash_expr _ (Type _) = WARN(True, text "hash_expr: type") 1
-- Shouldn't happen. Better to use WARN than trace, because trace
-- prevents the CPR optimisation kicking in for hash_expr.
-hash_expr _ (Coercion _) = WARN(True, text "hash_expr: coercion") 1
fast_hash_expr :: HashEnv -> CoreExpr -> Word32
fast_hash_expr env (Var v) = hashVar env v
More information about the Cvs-ghc
mailing list