aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2020-05-25 22:17:11 +0100
committerYann Herklotz <git@yannherklotz.com>2020-05-25 22:17:11 +0100
commit9f631b114e1cdcbaf3610eefd6f9fd7baeeda0c1 (patch)
tree51ea6969859aad9c1a9b27ba5ef7e82ca426fd61 /src/common
parent0c5ca8061a887f397991e62b580d5fc2f6484336 (diff)
downloadvericert-9f631b114e1cdcbaf3610eefd6f9fd7baeeda0c1.tar.gz
vericert-9f631b114e1cdcbaf3610eefd6f9fd7baeeda0c1.zip
Continuing work on proving specification
Diffstat (limited to 'src/common')
-rw-r--r--src/common/Monad.v6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/Monad.v b/src/common/Monad.v
index 773918a..8517186 100644
--- a/src/common/Monad.v
+++ b/src/common/Monad.v
@@ -39,4 +39,10 @@ Module MonadExtra(M : Monad).
ret (r::rs)
end.
+ Fixpoint collectlist {A : Type} (f : A -> mon unit) (l : list A) {struct l} : mon unit :=
+ match l with
+ | nil => ret tt
+ | x::xs => do _ <- f x; collectlist f xs
+ end.
+
End MonadExtra.