Commit 1de3ab4a authored by Krzysztof Gogolewski's avatar Krzysztof Gogolewski Committed by Marge Bot

Remove unused field var_inline (#17915)

parent 49e9d739
Pipeline #16735 passed with stages
in 763 minutes and 44 seconds
......@@ -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
......
......@@ -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
......
......@@ -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 []
......
......@@ -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
......
......@@ -66,8 +66,7 @@
(HsVar
(NoExtField)
({ <no location info> }
{Var: $krep})))))
(False)))
{Var: $krep})))))))
,({ <no location info> }
(VarBind
(NoExtField)
......@@ -132,8 +131,7 @@
(HsVar
(NoExtField)
({ <no location info> }
{Var: $krep})))))
(False)))
{Var: $krep})))))))
,({ <no location info> }
(VarBind
(NoExtField)
......@@ -198,8 +196,7 @@
(HsVar
(NoExtField)
({ <no location info> }
{Var: GHC.Types.krep$*})))))
(False)))
{Var: GHC.Types.krep$*})))))))
,({ <no location info> }
(VarBind
(NoExtField)
......@@ -264,8 +261,7 @@
(HsVar
(NoExtField)
({ <no location info> }
{Var: $krep})))))
(False)))
{Var: $krep})))))))
,({ <no location info> }
(VarBind
(NoExtField)
......@@ -330,8 +326,7 @@
(HsVar
(NoExtField)
({ <no location info> }
{Var: $krep})))))
(False)))
{Var: $krep})))))))
,({ <no location info> }
(VarBind
(NoExtField)
......@@ -352,8 +347,7 @@
(SourceText
"2")
(False)
(2)))))))
(False)))
(2)))))))))
,({ <no location info> }
(VarBind
(NoExtField)
......@@ -374,8 +368,7 @@
(SourceText
"1")
(False)
(1)))))))
(False)))
(1)))))))))
,({ <no location info> }
(VarBind
(NoExtField)
......@@ -396,8 +389,7 @@
(SourceText
"0")
(False)
(0)))))))
(False)))
(0)))))))))
,({ <no location info> }
(VarBind
(NoExtField)
......@@ -421,8 +413,7 @@
(HsVar
(NoExtField)
({ <no location info> }
{Var: $krep})))))
(False)))
{Var: $krep})))))))
,({ <no location info> }
(VarBind
(NoExtField)
......@@ -446,8 +437,7 @@
(HsVar
(NoExtField)
({ <no location info> }
{Var: GHC.Types.krep$*})))))
(False)))
{Var: GHC.Types.krep$*})))))))
,({ <no location info> }
(VarBind
(NoExtField)
......@@ -471,8 +461,7 @@
(HsVar
(NoExtField)
({ <no location info> }
{Var: $krep})))))
(False)))
{Var: $krep})))))))
,({ <no location info> }
(VarBind
(NoExtField)
......@@ -496,8 +485,7 @@
(HsVar
(NoExtField)
({ <no location info> }
{Var: $krep})))))
(False)))
{Var: $krep})))))))
,({ <no location info> }
(VarBind
(NoExtField)
......@@ -521,8 +509,7 @@
(HsVar
(NoExtField)
({ <no location info> }
{Var: $krep})))))
(False)))
{Var: $krep})))))))
,({ <no location info> }
(VarBind
(NoExtField)
......@@ -623,8 +610,7 @@
[]))
(HsConLikeOut
(NoExtField)
({abstract:ConLike})))))))))))))))))))
(False)))
({abstract:ConLike})))))))))))))))))))))
,({ <no location info> }
(VarBind
(NoExtField)
......@@ -653,8 +639,7 @@
[]))
(HsConLikeOut
(NoExtField)
({abstract:ConLike})))))))
(False)))
({abstract:ConLike})))))))))
,({ <no location info> }
(VarBind
(NoExtField)
......@@ -700,8 +685,7 @@
(NoExtField)
(HsStringPrim
(NoSourceText)
"DumpTypecheckedAst")))))))))
(False)))
"DumpTypecheckedAst")))))))))))
,({ DumpTypecheckedAst.hs:18:1-23 }
(AbsBinds
(NoExtField)
......@@ -767,3 +751,4 @@
[]))]}
(False)))]}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment