diff options
| author | Ian Lynagh <ian@well-typed.com> | 2012-10-16 15:28:26 +0100 |
|---|---|---|
| committer | Ian Lynagh <ian@well-typed.com> | 2012-10-16 16:08:38 +0100 |
| commit | cd33eefd0467ae7ee4d22f16fcaaccfd33f18cb5 (patch) | |
| tree | 30fb18578f1c5c81fef7ccc6ec5879a41fd4e5c0 /compiler/coreSyn | |
| parent | 6759e5a482d927870c90efe97b820d492785a6fd (diff) | |
| download | haskell-cd33eefd0467ae7ee4d22f16fcaaccfd33f18cb5.tar.gz | |
Some alpha renaming
Mostly d -> g (matching DynFlag -> GeneralFlag).
Also renamed if* to when*, matching the Haskell if/when names
Diffstat (limited to 'compiler/coreSyn')
| -rw-r--r-- | compiler/coreSyn/CoreArity.lhs | 6 | ||||
| -rw-r--r-- | compiler/coreSyn/CoreUnfold.lhs | 4 | ||||
| -rw-r--r-- | compiler/coreSyn/MkExternalCore.lhs | 2 | ||||
| -rw-r--r-- | compiler/coreSyn/PprCore.lhs | 14 |
4 files changed, 13 insertions, 13 deletions
diff --git a/compiler/coreSyn/CoreArity.lhs b/compiler/coreSyn/CoreArity.lhs index d89b67b68b..fbb98c2174 100644 --- a/compiler/coreSyn/CoreArity.lhs +++ b/compiler/coreSyn/CoreArity.lhs @@ -34,7 +34,7 @@ import TyCon ( isRecursiveTyCon, isClassTyCon ) import Coercion import BasicTypes import Unique -import DynFlags ( DynFlags, GeneralFlag(..), dopt ) +import DynFlags ( DynFlags, GeneralFlag(..), gopt ) import Outputable import FastString import Pair @@ -486,7 +486,7 @@ exprEtaExpandArity dflags cheap_app e where env = AE { ae_bndrs = [] , ae_cheap_fn = mk_cheap_fn dflags cheap_app - , ae_ped_bot = dopt Opt_PedanticBottoms dflags } + , ae_ped_bot = gopt Opt_PedanticBottoms dflags } has_lam (Tick _ e) = has_lam e has_lam (Lam b e) = isId b || has_lam e @@ -499,7 +499,7 @@ getBotArity _ = Nothing mk_cheap_fn :: DynFlags -> CheapAppFun -> CheapFun mk_cheap_fn dflags cheap_app - | not (dopt Opt_DictsCheap dflags) + | not (gopt Opt_DictsCheap dflags) = \e _ -> exprIsCheap' cheap_app e | otherwise = \e mb_ty -> exprIsCheap' cheap_app e diff --git a/compiler/coreSyn/CoreUnfold.lhs b/compiler/coreSyn/CoreUnfold.lhs index 7ed5d2b475..b02d06a418 100644 --- a/compiler/coreSyn/CoreUnfold.lhs +++ b/compiler/coreSyn/CoreUnfold.lhs @@ -908,7 +908,7 @@ callSiteInline dflags id active_unfolding lone_variable arg_infos cont_info | active_unfolding -> tryUnfolding dflags id lone_variable arg_infos cont_info unf_template is_top is_wf is_exp uf_arity guidance - | dopt Opt_D_dump_inlinings dflags && dopt Opt_D_verbose_core2core dflags + | gopt Opt_D_dump_inlinings dflags && gopt Opt_D_verbose_core2core dflags -> pprTrace "Inactive unfolding:" (ppr id) Nothing | otherwise -> Nothing NoUnfolding -> Nothing @@ -923,7 +923,7 @@ tryUnfolding dflags id lone_variable is_wf is_exp uf_arity guidance -- uf_arity will typically be equal to (idArity id), -- but may be less for InlineRules - | dopt Opt_D_dump_inlinings dflags && dopt Opt_D_verbose_core2core dflags + | gopt Opt_D_dump_inlinings dflags && gopt Opt_D_verbose_core2core dflags = pprTrace ("Considering inlining: " ++ showSDocDump dflags (ppr id)) (vcat [text "arg infos" <+> ppr arg_infos, text "uf arity" <+> ppr uf_arity, diff --git a/compiler/coreSyn/MkExternalCore.lhs b/compiler/coreSyn/MkExternalCore.lhs index 8844818bdc..4c1d435bc8 100644 --- a/compiler/coreSyn/MkExternalCore.lhs +++ b/compiler/coreSyn/MkExternalCore.lhs @@ -44,7 +44,7 @@ import System.IO emitExternalCore :: DynFlags -> CgGuts -> IO () emitExternalCore dflags cg_guts - | dopt Opt_EmitExternalCore dflags + | gopt Opt_EmitExternalCore dflags = (do handle <- openFile corename WriteMode hPutStrLn handle (show (mkExternalCore dflags cg_guts)) hClose handle) diff --git a/compiler/coreSyn/PprCore.lhs b/compiler/coreSyn/PprCore.lhs index bc3dc7a7f3..cdae3bd7c7 100644 --- a/compiler/coreSyn/PprCore.lhs +++ b/compiler/coreSyn/PprCore.lhs @@ -119,7 +119,7 @@ ppr_expr add_par (Cast expr co) ptext (sLit "`cast`") <+> pprCo co] where pprCo co = sdocWithDynFlags $ \dflags -> - if dopt Opt_SuppressCoercions dflags + if gopt Opt_SuppressCoercions dflags then ptext (sLit "...") else parens $ sep [ppr co, dcolon <+> pprEqPred (coercionKind co)] @@ -157,7 +157,7 @@ ppr_expr add_par expr@(App {}) ppr_expr add_par (Case expr var ty [(con,args,rhs)]) = sdocWithDynFlags $ \dflags -> - if dopt Opt_PprCaseAsLet dflags + if gopt Opt_PprCaseAsLet dflags then add_par $ sep [sep [ ptext (sLit "let") <+> char '{' @@ -252,7 +252,7 @@ ppr_case_pat con args pprArg :: OutputableBndr a => Expr a -> SDoc pprArg (Type ty) = sdocWithDynFlags $ \dflags -> - if dopt Opt_SuppressTypeApplications dflags + if gopt Opt_SuppressTypeApplications dflags then empty else ptext (sLit "@") <+> pprParendType ty pprArg (Coercion co) = ptext (sLit "@~") <+> pprParendCo co @@ -293,7 +293,7 @@ pprTypedLamBinder bind_site debug_on var | not debug_on && isDeadBinder var -> char '_' | not debug_on, CaseBind <- bind_site -> -- No parens, no kind info pprUntypedBinder var - | dopt Opt_SuppressTypeSignatures dflags -> -- Suppress the signature + | gopt Opt_SuppressTypeSignatures dflags -> -- Suppress the signature pprUntypedBinder var | isTyVar var -> parens (pprKindedTyVarBndr var) | otherwise -> @@ -311,7 +311,7 @@ pprTypedLetBinder binder case () of _ | isTyVar binder -> pprKindedTyVarBndr binder - | dopt Opt_SuppressTypeSignatures dflags -> pprIdBndr binder + | gopt Opt_SuppressTypeSignatures dflags -> pprIdBndr binder | otherwise -> hang (pprIdBndr binder) 2 (dcolon <+> pprType (idType binder)) pprKindedTyVarBndr :: TyVar -> SDoc @@ -327,7 +327,7 @@ pprIdBndr id = ppr id <+> pprIdBndrInfo (idInfo id) pprIdBndrInfo :: IdInfo -> SDoc pprIdBndrInfo info = sdocWithDynFlags $ \dflags -> - if dopt Opt_SuppressIdInfo dflags + if gopt Opt_SuppressIdInfo dflags then empty else megaSeqIdInfo info `seq` doc -- The seq is useful for poking on black holes where @@ -358,7 +358,7 @@ pprIdBndrInfo info ppIdInfo :: Id -> IdInfo -> SDoc ppIdInfo id info = sdocWithDynFlags $ \dflags -> - if dopt Opt_SuppressIdInfo dflags + if gopt Opt_SuppressIdInfo dflags then empty else showAttributes |
