File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff 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
1313Polymorphic 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
1616Polymorphic Class MonadStep (M : Type -> Type ) : Type :=
1717 mstep : M unit.
Original file line number Diff line number Diff 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
6666Arguments interp {E B M FM MM IM _ _ _} h [T].
6767
Original file line number Diff line number Diff 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. *)
Original file line number Diff line number Diff 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) :
You can’t perform that action at this time.
0 commit comments