chore: use Syntax.Level
This commit is contained in:
parent
22475b8669
commit
544a046678
1 changed files with 3 additions and 3 deletions
|
|
@ -447,8 +447,8 @@ mutual
|
|||
| Result.imaxNode fs, r => parenIfFalse (Format.group <| "imax" ++ formatLst fs) r
|
||||
end
|
||||
|
||||
protected partial def Result.quote (r : Result) (prec : Nat) : TSyntax `level :=
|
||||
let addParen (s : TSyntax `level) :=
|
||||
protected partial def Result.quote (r : Result) (prec : Nat) : Syntax.Level :=
|
||||
let addParen (s : Syntax.Level) :=
|
||||
if prec > 0 then Unhygienic.run `(level| ( $s )) else s
|
||||
match r with
|
||||
| Result.leaf n => Unhygienic.run `(level| $(mkIdent n):ident)
|
||||
|
|
@ -469,7 +469,7 @@ instance : ToFormat Level where
|
|||
instance : ToString Level where
|
||||
toString u := Format.pretty (Level.format u)
|
||||
|
||||
protected def quote (u : Level) (prec : Nat := 0) : TSyntax `level :=
|
||||
protected def quote (u : Level) (prec : Nat := 0) : Syntax.Level :=
|
||||
(PP.toResult u).quote prec
|
||||
|
||||
instance : Quote Level `level where
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue