diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/GHC/Hs/Binds.hs | 4 | ||||
-rw-r--r-- | compiler/GHC/Hs/Utils.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/HsToCore/Binds.hs | 7 | ||||
-rw-r--r-- | compiler/typecheck/TcHsSyn.hs | 5 |
4 files changed, 6 insertions, 12 deletions
diff --git a/compiler/GHC/Hs/Binds.hs b/compiler/GHC/Hs/Binds.hs index 6fabd4e748..3c815821f5 100644 --- a/compiler/GHC/Hs/Binds.hs +++ b/compiler/GHC/Hs/Binds.hs @@ -276,9 +276,7 @@ data HsBindLR idL idR | VarBind { var_ext :: XVarBind idL idR, var_id :: IdP idL, - var_rhs :: LHsExpr idR, -- ^ Located only for consistency - var_inline :: Bool -- ^ True <=> inline this binding regardless - -- (used for implication constraints only) + var_rhs :: LHsExpr idR -- ^ Located only for consistency } -- | Abstraction Bindings diff --git a/compiler/GHC/Hs/Utils.hs b/compiler/GHC/Hs/Utils.hs index ff1af93a6d..b1bdb089cf 100644 --- a/compiler/GHC/Hs/Utils.hs +++ b/compiler/GHC/Hs/Utils.hs @@ -824,7 +824,7 @@ mkHsVarBind loc var rhs = mkSimpleGeneratedFunBind loc var [] rhs mkVarBind :: IdP (GhcPass p) -> LHsExpr (GhcPass p) -> LHsBind (GhcPass p) mkVarBind var rhs = L (getLoc rhs) $ VarBind { var_ext = noExtField, - var_id = var, var_rhs = rhs, var_inline = False } + var_id = var, var_rhs = rhs } mkPatSynBind :: Located RdrName -> HsPatSynDetails (Located RdrName) -> LPat GhcPs -> HsPatSynDir GhcPs -> HsBind GhcPs diff --git a/compiler/GHC/HsToCore/Binds.hs b/compiler/GHC/HsToCore/Binds.hs index a80b2cc2d3..9c65603d53 100644 --- a/compiler/GHC/HsToCore/Binds.hs +++ b/compiler/GHC/HsToCore/Binds.hs @@ -135,14 +135,11 @@ dsHsBind :: DynFlags -- bindings and their desugared right hand sides. dsHsBind dflags (VarBind { var_id = var - , var_rhs = expr - , var_inline = inline_regardless }) + , var_rhs = expr }) = do { core_expr <- dsLExpr expr -- Dictionary bindings are always VarBinds, -- so we only need do this here - ; let var' | inline_regardless = var `setIdUnfolding` mkCompulsoryUnfolding core_expr - | otherwise = var - ; let core_bind@(id,_) = makeCorePair dflags var' False 0 core_expr + ; let core_bind@(id,_) = makeCorePair dflags var False 0 core_expr force_var = if xopt LangExt.Strict dflags then [id] else [] diff --git a/compiler/typecheck/TcHsSyn.hs b/compiler/typecheck/TcHsSyn.hs index d9626c2854..7fbed31dff 100644 --- a/compiler/typecheck/TcHsSyn.hs +++ b/compiler/typecheck/TcHsSyn.hs @@ -553,13 +553,12 @@ zonk_bind env bind@(PatBind { pat_lhs = pat, pat_rhs = grhss , pat_ext = NPatBindTc fvs new_ty }) } zonk_bind env (VarBind { var_ext = x - , var_id = var, var_rhs = expr, var_inline = inl }) + , var_id = var, var_rhs = expr }) = do { new_var <- zonkIdBndr env var ; new_expr <- zonkLExpr env expr ; return (VarBind { var_ext = x , var_id = new_var - , var_rhs = new_expr - , var_inline = inl }) } + , var_rhs = new_expr }) } zonk_bind env bind@(FunBind { fun_id = L loc var , fun_matches = ms |