Skip to content

Commit 5cca847

Browse files
Fix trim -> trimAscii.toString (Lean v4.27.0-rc1)
1 parent 45a81c2 commit 5cca847

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

REPL/Extract/Declaration.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ def getModifiers (stx : Syntax) (ctx: ContextInfo): DeclModifiers :=
1414
| .node _ ``Command.declModifiers _ =>
1515
{ docString := stx[0].getOptional?.map (fun stx =>
1616
{ content := stx.prettyPrint.pretty, range := stx.toRange ctx }),
17-
visibility := (stx[2].getOptional?.map (·.prettyPrint.pretty.trim)).getD "regular",
18-
computeKind := (stx[4].getOptional?.map (·.prettyPrint.pretty.trim)).getD "regular",
17+
visibility := (stx[2].getOptional?.map (·.prettyPrint.pretty.trimAscii.toString)).getD "regular",
18+
computeKind := (stx[4].getOptional?.map (·.prettyPrint.pretty.trimAscii.toString)).getD "regular",
1919
isProtected := !stx[3].isNone,
2020
isUnsafe := !stx[5].isNone,
21-
recKind := (stx[6].getOptional?.map (·.prettyPrint.pretty.trim)).getD "default",
21+
recKind := (stx[6].getOptional?.map (·.prettyPrint.pretty.trimAscii.toString)).getD "default",
2222
attributes := stx[1].getArgs.toList.flatMap parseAttributes, }
2323
| _ => {}
2424
where
@@ -32,7 +32,7 @@ def getModifiers (stx : Syntax) (ctx: ContextInfo): DeclModifiers :=
3232
if args.size > 1 then
3333
args[1]!.getArgs.toList.flatMap fun inst =>
3434
match inst with
35-
| .node _ ``Term.attrInstance _ => [inst.prettyPrint.pretty.trim]
35+
| .node _ ``Term.attrInstance _ => [inst.prettyPrint.pretty.trimAscii.toString]
3636
| _ => []
3737
else []
3838
| _ => []

0 commit comments

Comments
 (0)