projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update install-sh
[ghc-hetmet.git]
/
compiler
/
specialise
/
Rules.lhs
diff --git
a/compiler/specialise/Rules.lhs
b/compiler/specialise/Rules.lhs
index
fbdf925
..
24c4004
100644
(file)
--- a/
compiler/specialise/Rules.lhs
+++ b/
compiler/specialise/Rules.lhs
@@
-4,11
+4,11
@@
\section[CoreRules]{Transformation rules}
\begin{code}
\section[CoreRules]{Transformation rules}
\begin{code}
-{-# OPTIONS_GHC -w #-}
+{-# OPTIONS -w #-}
-- The above warning supression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and fix
-- any warnings in the module. See
-- The above warning supression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and fix
-- any warnings in the module. See
--- http://hackage.haskell.org/trac/ghc/wiki/WorkingConventions#Warnings
+-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
-- for details
module Rules (
-- for details
module Rules (
@@
-595,11
+595,8
@@
match menv subst (Type ty1) (Type ty2)
= match_ty menv subst ty1 ty2
match menv subst (Cast e1 co1) (Cast e2 co2)
= match_ty menv subst ty1 ty2
match menv subst (Cast e1 co1) (Cast e2 co2)
- | (from1, to1) <- coercionKind co1
- , (from2, to2) <- coercionKind co2
- = do { subst1 <- match_ty menv subst to1 to2
- ; subst2 <- match_ty menv subst1 from1 from2
- ; match menv subst2 e1 e2 }
+ = do { subst1 <- match_ty menv subst co1 co2
+ ; match menv subst1 e1 e2 }
{- REMOVING OLD CODE: I think that the above handling for let is
better than the stuff here, which looks
{- REMOVING OLD CODE: I think that the above handling for let is
better than the stuff here, which looks
@@
-646,6
+643,8
@@
match_var menv subst@(tv_subst, id_subst, binds) v1 e2
| otherwise -- No renaming to do on e2, because no free var
-- of e2 is in the rnEnvR of the envt
| otherwise -- No renaming to do on e2, because no free var
-- of e2 is in the rnEnvR of the envt
+ -- Note [Matching variable types]
+ -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- However, we must match the *types*; e.g.
-- forall (c::Char->Int) (x::Char).
-- f (c x) = "RULE FIRED"
-- However, we must match the *types*; e.g.
-- forall (c::Char->Int) (x::Char).
-- f (c x) = "RULE FIRED"