Skip to content

Commit 0339cd2

Browse files
authored
fix: don't drop state during update in Param.toMono (#8582)
This PR fixes an accidental dropping of state in Param.toMono. When this code was originally written, there was no other state besides `typeParams`.
1 parent bae336d commit 0339cd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Lean/Compiler/LCNF/ToMono.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ abbrev ToMonoM := StateRefT ToMonoM.State CompilerM
1919

2020
def Param.toMono (param : Param) : ToMonoM Param := do
2121
if isTypeFormerType param.type then
22-
modify fun { typeParams, .. } => { typeParams := typeParams.insert param.fvarId }
22+
modify fun s => { s with typeParams := s.typeParams.insert param.fvarId }
2323
param.update (← toMonoType param.type)
2424

2525
def isTrivialConstructorApp? (declName : Name) (args : Array Arg) : ToMonoM (Option LetValue) := do

0 commit comments

Comments
 (0)