Skip to content

Commit 6fdc358

Browse files
committed
MonadLaws: add back return_of_bind
1 parent aeb71ca commit 6fdc358

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

theories/Structures/MonadLaws.v

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Section MonadLaws.
2222
Class MonadLaws :=
2323
{ bind_of_return : forall {A B} (a : A) (f : A -> m B),
2424
bind (ret a) f = f a
25+
; return_of_bind : forall {A} (aM: m A),
26+
bind aM ret = aM
2527
; bind_associativity :
2628
forall {A B C} (aM:m A) (f:A -> m B) (g:B -> m C),
2729
bind (bind aM f) g = bind aM (fun a => bind (f a) g)

0 commit comments

Comments
 (0)