projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fd1e03d
)
[project @ 2002-09-09 12:50:26 by simonpj]
author
simonpj
<unknown>
Mon, 9 Sep 2002 12:50:26 +0000
(12:50 +0000)
committer
simonpj
<unknown>
Mon, 9 Sep 2002 12:50:26 +0000
(12:50 +0000)
Formatting only
ghc/compiler/typecheck/TcBinds.lhs
patch
|
blob
|
history
diff --git
a/ghc/compiler/typecheck/TcBinds.lhs
b/ghc/compiler/typecheck/TcBinds.lhs
index
045cdcc
..
c6ca52d
100644
(file)
--- a/
ghc/compiler/typecheck/TcBinds.lhs
+++ b/
ghc/compiler/typecheck/TcBinds.lhs
@@
-18,8
+18,7
@@
import HsSyn ( HsExpr(..), HsBinds(..), MonoBinds(..), Sig(..),
collectMonoBinders, andMonoBinds,
collectSigTysFromMonoBinds
)
collectMonoBinders, andMonoBinds,
collectSigTysFromMonoBinds
)
-import RnHsSyn ( RenamedHsBinds, RenamedSig, RenamedMonoBinds,
- RenamedTyClDecl )
+import RnHsSyn ( RenamedHsBinds, RenamedSig, RenamedMonoBinds )
import TcHsSyn ( TcMonoBinds, TcId, zonkId, mkHsLet )
import TcMonad
import TcHsSyn ( TcMonoBinds, TcId, zonkId, mkHsLet )
import TcMonad
@@
-263,13
+262,16
@@
tcBindWithSigs top_lvl mbind tc_ty_sigs inline_sigs is_rec
dict_tys = map idType zonked_dict_ids
inlines = mkNameSet [name | InlineSig True name _ loc <- inline_sigs]
dict_tys = map idType zonked_dict_ids
inlines = mkNameSet [name | InlineSig True name _ loc <- inline_sigs]
- no_inlines = listToFM [(name, phase) | InlineSig _ name phase _ <- inline_sigs,
- not (isAlwaysActive phase)]
+ -- Any INLINE sig (regardless of phase control)
+ -- makes the RHS look small
+ inline_phases = listToFM [(name, phase) | InlineSig _ name phase _ <- inline_sigs,
+ not (isAlwaysActive phase)]
+ -- Set the IdInfo field to control the inline phase
-- AlwaysActive is the default, so don't bother with them
mk_export binder_name zonked_mono_id
= (tyvars,
-- AlwaysActive is the default, so don't bother with them
mk_export binder_name zonked_mono_id
= (tyvars,
- attachNoInlinePrag no_inlines poly_id,
+ attachInlinePhase inline_phases poly_id,
zonked_mono_id)
where
(tyvars, poly_id) =
zonked_mono_id)
where
(tyvars, poly_id) =
@@
-314,8
+316,8
@@
tcBindWithSigs top_lvl mbind tc_ty_sigs inline_sigs is_rec
lie_free, poly_ids
)
lie_free, poly_ids
)
-attachNoInlinePrag no_inlines bndr
- = case lookupFM no_inlines (idName bndr) of
+attachInlinePhase inline_phases bndr
+ = case lookupFM inline_phases (idName bndr) of
Just prag -> bndr `setInlinePragma` prag
Nothing -> bndr
Just prag -> bndr `setInlinePragma` prag
Nothing -> bndr