blob: 17c9dd730eed6dcb14aa857dac595114d5d6f8fb [file]
inductive Nested
| nest (a : Array Nested) : Nested
class OfUnit (α : Type) where
ofUnit : Unit → Except String α
instance myArrayInst [OfUnit α] : OfUnit (Array α) where
ofUnit _ := Except.error ""
open OfUnit
partial def ofUnitNested (_ : Unit) : Except String Nested := do
let localinst : OfUnit Nested := ⟨ofUnitNested⟩
let units : Array Unit ← Except.ok #[]
let a ← ofUnit ()
return Nested.nest a