Skip to content

Commit

Permalink
Add Monad instance for identity monad
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonGross committed Apr 2, 2023
1 parent 2442088 commit 4b33a42
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions utils/theories/monad_utils.v
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ Import MCMonadNotation.
end
|}.

#[global] Instance id_monad : Monad (fun x => x) :=
{| ret A a := a ;
bind A B m f := f m
|}.

#[global] Instance option_monad_exc : MonadExc unit option :=
{| raise T _ := None ;
catch T m f :=
Expand Down

0 comments on commit 4b33a42

Please sign in to comment.