feat: instance for Inhabited (TacticM α) (#5401)

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.
This commit is contained in:
Alex Keizer 2024-09-20 01:07:02 -05:00 committed by GitHub
parent e43664c405
commit d8e0fa425b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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