Skip to content

Commit

Permalink
feat: instance for Inhabited (TacticM α) (#5401)
Browse files Browse the repository at this point in the history
Provide an instance `Inhabited (TacticM α)`, even when `α` is not known
to be inhabited.

The default value is just the default value of `TermElabM α`, which
already has a similar instance.
  • Loading branch information
alexkeizer authored Sep 20, 2024
1 parent e43664c commit d8e0fa4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Lean/Elab/Tactic/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ instance : Monad TacticM :=
let i := inferInstanceAs (Monad TacticM);
{ pure := i.pure, bind := i.bind }

instance : Inhabited (TacticM α) where
default := fun _ _ => default

def getGoals : TacticM (List MVarId) :=
return (← get).goals

Expand Down

0 comments on commit d8e0fa4

Please sign in to comment.