Skip to content

Commit 644c5ed

Browse files
cppioalgebraic-dev
authored andcommitted
chore: remove unused syntax (leanprover#8760)
Removes unused `tailrecursion` syntax.
1 parent 5e14c29 commit 644c5ed

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/Lean/Elab/PreDefinition/TerminationHint.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,10 @@ def elabTerminationHints {m} [Monad m] [MonadError m] (stx : TSyntax ``suffix) :
152152
| _ => pure none
153153
else pure none
154154
let terminationBy? : Option TerminationBy ← if let some t := t? then match t with
155-
| `(terminationBy|termination_by partialFixpointursion) =>
156-
pure (some {ref := t, structural := false, vars := #[], body := ⟨.missing⟩ : TerminationBy})
157155
| `(terminationBy|termination_by $[structural%$s]? => $_body) =>
158156
throwErrorAt t "no extra parameters bounds, please omit the `=>`"
159157
| `(terminationBy|termination_by $[structural%$s]? $vars* => $body) =>
160-
pure (some {ref := t, structural := s.isSome, vars, body})
158+
pure (some {ref := t, structural := s.isSome, vars, body : TerminationBy})
161159
| `(terminationBy|termination_by $[structural%$s]? $body:term) =>
162160
pure (some {ref := t, structural := s.isSome, vars := #[], body})
163161
| `(terminationBy?|termination_by?) => pure none

src/Lean/Parser/Term.lean

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -720,11 +720,10 @@ the inferrred termination measure will be suggested.
720720
721721
-/
722722
@[builtin_doc] def terminationBy := leading_parser
723-
"termination_by " >> (
724-
(nonReservedSymbol "tailrecursion") <|>
725-
(optional (nonReservedSymbol "structural ") >>
726-
optional (atomic (many (ppSpace >> Term.binderIdent) >> " => ")) >>
727-
termParser))
723+
"termination_by " >>
724+
optional (nonReservedSymbol "structural ") >>
725+
optional (atomic (many (ppSpace >> Term.binderIdent) >> " => ")) >>
726+
termParser
728727

729728
@[inherit_doc terminationBy, builtin_doc]
730729
def terminationBy? := leading_parser

0 commit comments

Comments
 (0)