@@ -217,7 +217,7 @@ It is ``elabTerm `(do $e; $rest) = elabDoElem e dec``, where `elabDoElem e ·` i
217217`do` element `e`, and `dec` is the `DoElemCont` describing the elaboration of the rest of the block
218218`rest`.
219219-/
220- abbrev DoElab := TSyntax `doElem → DoElemCont → DoElabM Expr
220+ abbrev DoElab := DoElem → DoElemCont → DoElabM Expr
221221
222222structure ReturnCont where
223223 resultType : Expr
@@ -830,7 +830,7 @@ private partial def hasNestedActionsToLift : Syntax → Bool
830830 else args.any hasNestedActionsToLift
831831 | _ => false
832832
833- private partial def expandNestedActionsAux (baseId : Name) (inQuot : Bool) (inBinder : Bool) : Syntax → StateT (Array (TSyntax `doElem) ) DoElabM Syntax
833+ private partial def expandNestedActionsAux (baseId : Name) (inQuot : Bool) (inBinder : Bool) : Syntax → StateT (Array DoElem ) DoElabM Syntax
834834 | stx@(Syntax.node i k args) =>
835835 if k == choiceKind then do
836836 -- choice node: check that lifts are consistent
@@ -856,7 +856,7 @@ private partial def expandNestedActionsAux (baseId : Name) (inQuot : Bool) (inBi
856856 -- Wrap raw terms in `doExpr` so the subsequent `let _ ← _` quotation parses correctly.
857857 let isDoElem :=
858858 (Parser.getParserCategory? (← getEnv) `doElem).any (·.kinds.contains arg.getKind)
859- let act : TSyntax `doElem ←
859+ let act : DoElem ←
860860 if isDoElem then pure ⟨arg⟩
861861 else let t : Term := ⟨arg⟩; `(doElem| $t:term)
862862 -- keep name deterministic across choice branches
@@ -871,7 +871,7 @@ private partial def expandNestedActionsAux (baseId : Name) (inQuot : Bool) (inBi
871871 return Syntax.node i k args
872872 | stx => return stx
873873
874- def expandNestedActions (stx : TSyntax kind) : DoElabM (Array (TSyntax `doElem) × TSyntax kind) := do
874+ def expandNestedActions (stx : TSyntax kind) : DoElabM (Array DoElem × TSyntax kind) := do
875875 if !hasNestedActionsToLift stx then
876876 return (#[], stx)
877877 else
@@ -907,7 +907,7 @@ private def withTermInfoContext' (elaborator : Name) (stx : Syntax) (expectedTyp
907907 controlAtTermElabM fun runInBase =>
908908 Term.withTermInfoContext' elaborator stx (expectedType? := expectedType) (runInBase x)
909909
910- private def elabDoElemFns (stx : TSyntax `doElem ) (cont : DoElemCont)
910+ private def elabDoElemFns (stx : DoElem ) (cont : DoElemCont)
911911 (fns : List (KeyedDeclsAttribute.AttributeEntry DoElab)) (catchExPostpone : Bool := true ) : DoElabM Expr := do
912912 let s ← saveState
913913 match fns with
@@ -935,7 +935,7 @@ private def DoElemCont.mkUnit (k : DoElabM Expr) : DoElabM DoElemCont := do
935935 return DoElemCont.mk r unit k .nonDuplicable
936936
937937mutual
938- partial def elabDoElem (stx : TSyntax `doElem ) (cont : DoElemCont) (catchExPostpone : Bool := true ) : DoElabM Expr := do
938+ partial def elabDoElem (stx : DoElem ) (cont : DoElemCont) (catchExPostpone : Bool := true ) : DoElabM Expr := do
939939 let k := stx.raw.getKind
940940 trace[Elab.do.step] "do element: { stx} "
941941 checkSystem "do element elaborator"
@@ -963,7 +963,7 @@ partial def elabDoElem (stx : TSyntax `doElem) (cont : DoElemCont) (catchExPostp
963963 | [] => throwError "elaboration function for `{k}` has not been implemented{indentD stx}"
964964 | elabFns => elabDoElemFns stx cont elabFns catchExPostpone
965965
966- partial def elabDoElems1 (doElems : Array (TSyntax `doElem) ) (cont : DoElemCont) (catchExPostpone : Bool := true ) : DoElabM Expr := do
966+ partial def elabDoElems1 (doElems : Array DoElem ) (cont : DoElemCont) (catchExPostpone : Bool := true ) : DoElabM Expr := do
967967 if h : doElems.size = 0 then
968968 throwError "Empty array of `do` elements passed to `elabDoElems1`."
969969 else
@@ -976,7 +976,7 @@ partial def elabDoElems1 (doElems : Array (TSyntax `doElem)) (cont : DoElemCont)
976976 res
977977end
978978
979- partial def elabDoSeq (doSeq : TSyntax ``doSeq ) (cont : DoElemCont) (catchExPostpone : Bool := true ) : DoElabM Expr := do
979+ partial def elabDoSeq (doSeq : DoSeq ) (cont : DoElemCont) (catchExPostpone : Bool := true ) : DoElabM Expr := do
980980 let s ← saveState
981981 try
982982 elabDoElems1 (getDoElems doSeq) cont catchExPostpone
@@ -996,7 +996,7 @@ def elabNestedAction : Term.TermElab := fun stx _ty? => do
996996 throwErrorAt stx "Nested action `{stx}` must be nested inside a `do` expression."
997997
998998/-- Elaborate `doSeq` using `ops` for pure/bind construction. -/
999- def elabDoWith (ops : DoOps) (doSeq : TSyntax ``doSeq )
999+ def elabDoWith (ops : DoOps) (doSeq : DoSeq )
10001000 (expectedType? : Option Expr) : TermElabM Expr := do
10011001 Term.tryPostponeIfNoneOrMVar expectedType?
10021002 let ctx ← mkContext expectedType? (ops := ops)
0 commit comments