mathlib3 documentation

core / init.meta.exceptional

meta inductive exceptional (α : Type) :

An exceptional is similar to Result in Haskell.

Remark: we use a function that produces a format object as the exception information. Motivation: the formatting object may be big, and we may create it on demand.

Instances for exceptional
@[protected]
@[protected, instance]
@[protected]
meta def exceptional.to_bool {α : Type} :
@[protected]
meta def exceptional.to_option {α : Type} :
@[protected]
meta def exceptional.bind {α β : Type} (e₁ : exceptional α) (e₂ : α exceptional β) :
@[protected]
meta def exceptional.return {α : Type} (a : α) :
meta def exceptional.fail {α : Type} (f : format) :
@[protected, instance]