projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
inline has moved to GHC.Magic
[ghc-hetmet.git]
/
compiler
/
prelude
/
PrelRules.lhs
diff --git
a/compiler/prelude/PrelRules.lhs
b/compiler/prelude/PrelRules.lhs
index
236cee6
..
1515fb9
100644
(file)
--- a/
compiler/prelude/PrelRules.lhs
+++ b/
compiler/prelude/PrelRules.lhs
@@
-21,7
+21,7
@@
module PrelRules ( primOpRules, builtinRules ) where
import CoreSyn
import MkCore ( mkWildCase )
import CoreSyn
import MkCore ( mkWildCase )
-import Id ( idUnfolding )
+import Id ( realIdUnfolding )
import Literal ( Literal(..), mkMachInt, mkMachWord
, literalType
, word2IntLit, int2WordLit
import Literal ( Literal(..), mkMachInt, mkMachWord
, literalType
, word2IntLit, int2WordLit
@@
-551,7
+551,7
@@
match_eq_string _ = Nothing
---------------------------------------------------
-- The rule is this:
-- inline f_ty (f a b c) = <f's unfolding> a b c
---------------------------------------------------
-- The rule is this:
-- inline f_ty (f a b c) = <f's unfolding> a b c
--- (if f has an unfolding)
+-- (if f has an unfolding, EVEN if it's a loop breaker)
--
-- It's important to allow the argument to 'inline' to have args itself
-- (a) because its more forgiving to allow the programmer to write
--
-- It's important to allow the argument to 'inline' to have args itself
-- (a) because its more forgiving to allow the programmer to write
@@
-564,7
+564,7
@@
match_eq_string _ = Nothing
match_inline :: [Expr CoreBndr] -> Maybe (Expr CoreBndr)
match_inline (Type _ : e : _)
| (Var f, args1) <- collectArgs e,
match_inline :: [Expr CoreBndr] -> Maybe (Expr CoreBndr)
match_inline (Type _ : e : _)
| (Var f, args1) <- collectArgs e,
- Just unf <- maybeUnfoldingTemplate (idUnfolding f)
+ Just unf <- maybeUnfoldingTemplate (realIdUnfolding f)
= Just (mkApps unf args1)
match_inline _ = Nothing
= Just (mkApps unf args1)
match_inline _ = Nothing