Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
1de3ab4a
Commit
1de3ab4a
authored
Mar 13, 2020
by
Krzysztof Gogolewski
Committed by
Marge Bot
Mar 14, 2020
Browse files
Remove unused field var_inline (
#17915
)
parent
49e9d739
Pipeline
#16735
passed with stages
in 763 minutes and 44 seconds
Changes
5
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
compiler/GHC/Hs/Binds.hs
View file @
1de3ab4a
...
...
@@ -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
...
...
compiler/GHC/Hs/Utils.hs
View file @
1de3ab4a
...
...
@@ -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
...
...
compiler/GHC/HsToCore/Binds.hs
View file @
1de3ab4a
...
...
@@ -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
[]
...
...
compiler/typecheck/TcHsSyn.hs
View file @
1de3ab4a
...
...
@@ -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
...
...
testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr
View file @
1de3ab4a
...
...
@@ -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)))]}
Marge Bot
💬
@marge-bot
mentioned in merge request
!2878 (closed)
·
Mar 14, 2020
mentioned in merge request
!2878 (closed)
mentioned in merge request !2878
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment