Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion theories/Core/Utils.v
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Polymorphic Class MonadTrigger (E : Type -> Type) (M : Type -> Type) : Type :=
mtrigger : forall {X}, E X -> M X.

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

Polymorphic Class MonadStep (M : Type -> Type) : Type :=
mstep : M unit.
Expand Down
2 changes: 1 addition & 1 deletion theories/Interp/Fold.v
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Definition interp {E B M : Type -> Type}
{Mstep : MonadStep M}
{Mbranch : MonadBr B M}
(h : E ~> M) : ctree E B ~> M :=
fold h mbr.
fold h (@mbr B M Mbranch).

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

Expand Down
2 changes: 1 addition & 1 deletion theories/Interp/FoldCTree.v
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Section FoldCTree.
| GuardF t => Guard (interp h t)
| StepF t => Step (Guard (interp h t))
| VisF e k => bind (h _ e) (fun x => Guard (interp h (k x)))
| BrF c k => bind (mbr _ c) (fun x => Guard (interp h (k x)))
| BrF c k => bind (mbr c) (fun x => Guard (interp h (k x)))
end)%function.

(** Unfold lemma. *)
Expand Down
4 changes: 2 additions & 2 deletions theories/Interp/FoldStateT.v
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Arguments fequ : simpl never.

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

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

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