chore: remove builtin subtype notation
This commit is contained in:
parent
1a8dafccc5
commit
0ddc2e5efb
2 changed files with 0 additions and 7 deletions
|
|
@ -19,12 +19,6 @@ open Meta
|
|||
| `($f $ $a) => `($f $a)
|
||||
| _ => Macro.throwUnsupported
|
||||
|
||||
@[builtinMacro Lean.Parser.Term.subtype] def expandSubtype : Macro := fun stx =>
|
||||
match_syntax stx with
|
||||
| `({ $x : $type // $p }) => `(Subtype (fun ($x:ident : $type) => $p))
|
||||
| `({ $x // $p }) => `(Subtype (fun ($x:ident : _) => $p))
|
||||
| _ => Macro.throwUnsupported
|
||||
|
||||
@[builtinTermElab anonymousCtor] def elabAnonymousCtor : TermElab := fun stx expectedType? =>
|
||||
match_syntax stx with
|
||||
| `(⟨$args*⟩) => do
|
||||
|
|
|
|||
|
|
@ -73,7 +73,6 @@ def structInstField := ppGroup $ parser! structInstLVal >> " := " >> termParser
|
|||
@[builtinTermParser] def structInst := parser! "{" >> ppHardSpace >> optional («try» (termParser >> " with ")) >> sepBy structInstField ", " true >> optional ".." >> optional (" : " >> termParser) >> " }"
|
||||
def typeSpec := parser! " : " >> termParser
|
||||
def optType : Parser := optional typeSpec
|
||||
@[builtinTermParser] def subtype := parser! "{ " >> ident >> optType >> " // " >> termParser >> " }"
|
||||
@[builtinTermParser] def explicit := parser! "@" >> termParser maxPrec
|
||||
@[builtinTermParser] def inaccessible := parser! ".(" >> termParser >> ")"
|
||||
def binderIdent : Parser := ident <|> hole
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue