feat: Thunk is inhabited (#12469)
This PR adds the `Inhabited` instance for `Thunk`. We need this in batteries to call `PersistentEnvExtension.getState` on a state that is wrapped in a `Thunk`, see https://github.com/leanprover-community/batteries/pull/1667/changes.
This commit is contained in:
parent
fd5329126b
commit
518a135777
1 changed files with 2 additions and 0 deletions
|
|
@ -172,6 +172,8 @@ instance thunkCoe : CoeTail α (Thunk α) where
|
|||
-- Since coercions are expanded eagerly, `a` is evaluated lazily.
|
||||
coe a := ⟨fun _ => a⟩
|
||||
|
||||
instance [Inhabited α] : Inhabited (Thunk α) := ⟨.pure default⟩
|
||||
|
||||
/-- A variation on `Eq.ndrec` with the equality argument first. -/
|
||||
abbrev Eq.ndrecOn.{u1, u2} {α : Sort u2} {a : α} {motive : α → Sort u1} {b : α} (h : a = b) (m : motive a) : motive b :=
|
||||
Eq.ndrec m h
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue