Skip to content

Instantly share code, notes, and snippets.

View protz's full-sized avatar

Jonathan Protzenko protz

View GitHub Profile
import Std
-- FIXME -- surely something like this is in Std?
def Option.except {m α e} [Pure m] [MonadExcept e m] (self: Option α) (err : e): m α :=
match self with
| .none => throw err
| .some v => pure v
-- STATE, INSTRUCTIONS, LABELS