diff options
author | Yann Herklotz <git@yannherklotz.com> | 2022-07-19 08:53:57 +0200 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2022-07-19 08:53:57 +0200 |
commit | 5321f82fb46a87ca372b10ba5729509871cc935a (patch) | |
tree | 599ab805c9a807e9883cbae2dac034162e95890f /src/common/Monad.v | |
parent | aa753acd776638971abb5d9901cc99ef259cb314 (diff) | |
download | vericert-5321f82fb46a87ca372b10ba5729509871cc935a.tar.gz vericert-5321f82fb46a87ca372b10ba5729509871cc935a.zip |
Work on implementing abstract predicates
Diffstat (limited to 'src/common/Monad.v')
-rw-r--r-- | src/common/Monad.v | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/common/Monad.v b/src/common/Monad.v index fcbe527..ece047c 100644 --- a/src/common/Monad.v +++ b/src/common/Monad.v @@ -18,6 +18,8 @@ From Coq Require Import Lists.List. +Declare Scope monad_scope. + Module Type Monad. Parameter mon : Type -> Type. @@ -36,17 +38,18 @@ End Monad. Module MonadExtra(M : Monad). Import M. - Module MonadNotation. + Module Import MonadNotation. Notation "'do' X <- A ; B" := (bind A (fun X => B)) - (at level 200, X name, A at level 100, B at level 200). + (at level 200, X name, A at level 100, B at level 200) : monad_scope. Notation "'do' ( X , Y ) <- A ; B" := (bind2 A (fun X Y => B)) - (at level 200, X name, Y name, A at level 100, B at level 200). + (at level 200, X name, Y name, A at level 100, B at level 200) : monad_scope. End MonadNotation. - Import MonadNotation. + + #[local] Open Scope monad_scope. Fixpoint traverselist {A B: Type} (f: A -> mon B) (l: list A) {struct l}: mon (list B) := match l with |