Skip to content

Commit 2a7b3b8

Browse files
Zdancewicnchappe
authored andcommitted
change the definition of MonadBr to match MonadTrigger
1 parent 04d0326 commit 2a7b3b8

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

theories/Core/Utils.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Polymorphic Class MonadTrigger (E : Type -> Type) (M : Type -> Type) : Type :=
1111
mtrigger : forall {X}, E X -> M X.
1212

1313
Polymorphic Class MonadBr (B : Type -> Type) (M : Type -> Type) : Type :=
14-
mbr : forall X (b: B X), M X.
14+
mbr : forall {X}, B X -> M X.
1515

1616
Polymorphic Class MonadStep (M : Type -> Type) : Type :=
1717
mstep : M unit.

theories/Interp/Fold.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Definition interp {E B M : Type -> Type}
6161
{Mstep : MonadStep M}
6262
{Mbranch : MonadBr B M}
6363
(h : E ~> M) : ctree E B ~> M :=
64-
fold h mbr.
64+
fold h (@mbr B M Mbranch).
6565

6666
Arguments interp {E B M FM MM IM _ _ _} h [T].
6767

theories/Interp/FoldCTree.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Section FoldCTree.
122122
| GuardF t => Guard (interp h t)
123123
| StepF t => Step (Guard (interp h t))
124124
| VisF e k => bind (h _ e) (fun x => Guard (interp h (k x)))
125-
| BrF c k => bind (mbr _ c) (fun x => Guard (interp h (k x)))
125+
| BrF c k => bind (mbr c) (fun x => Guard (interp h (k x)))
126126
end)%function.
127127

128128
(** Unfold lemma. *)

theories/Interp/FoldStateT.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Arguments fequ : simpl never.
3333

3434
#[global] Instance MonadBr_stateT {S M C} {MM : Monad M} {AM : MonadBr C M}:
3535
MonadBr C (stateT S M) :=
36-
fun X c s => f <- mbr _ c;; ret (s,f).
36+
fun X c s => f <- mbr c;; ret (s,f).
3737

3838
#[global] Instance MonadTrigger_stateT {E S M} {MM : Monad M} {MT: MonadTrigger E M} :
3939
MonadTrigger E (stateT S M) :=
@@ -225,7 +225,7 @@ Section State.
225225
| GuardF t => Guard (interp_state h t s)
226226
| StepF t => Step (Guard (interp_state h t s))
227227
| VisF e k => bind (h _ e s) (fun xs => Guard (interp_state h (k (snd xs)) (fst xs)))
228-
| BrF c k => bind (mbr (M := stateT _ _) _ c s) (fun xs => Guard (interp_state h (k (snd xs)) (fst xs)))
228+
| BrF c k => bind (mbr (M := stateT _ _) c s) (fun xs => Guard (interp_state h (k (snd xs)) (fst xs)))
229229
end)%function.
230230

231231
Lemma unfold_interp_state `{C-<D} (t : ctree E C R) (s : S) :

0 commit comments

Comments
 (0)