From a63bd8f558fedec86451f36d86833c9afb934ae8 Mon Sep 17 00:00:00 2001 From: simonpj Date: Mon, 9 Sep 2002 12:50:26 +0000 Subject: [PATCH] [project @ 2002-09-09 12:50:26 by simonpj] Formatting only --- ghc/compiler/typecheck/TcBinds.lhs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ghc/compiler/typecheck/TcBinds.lhs b/ghc/compiler/typecheck/TcBinds.lhs index 045cdcc..c6ca52d 100644 --- 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 ) -import RnHsSyn ( RenamedHsBinds, RenamedSig, RenamedMonoBinds, - RenamedTyClDecl ) +import RnHsSyn ( RenamedHsBinds, RenamedSig, RenamedMonoBinds ) 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] - 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, - attachNoInlinePrag no_inlines poly_id, + attachInlinePhase inline_phases 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 ) -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 -- 1.7.10.4