summaryrefslogtreecommitdiff
path: root/lib/basis.urs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/basis.urs')
-rw-r--r--lib/basis.urs19
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/basis.urs b/lib/basis.urs
index eb2a6d29..25923870 100644
--- a/lib/basis.urs
+++ b/lib/basis.urs
@@ -69,15 +69,22 @@ val read_bool : read bool
val read_time : read time
-(** * Transactions *)
+(** * Monads *)
+
+class monad :: Type -> Type
+val return : m ::: (Type -> Type) -> t ::: Type
+ -> monad m
+ -> t -> m t
+val bind : m ::: (Type -> Type) -> t1 ::: Type -> t2 ::: Type
+ -> monad m
+ -> m t1 -> (t1 -> m t2)
+ -> m t2
+
+(** ** Transactions *)
con transaction :: Type -> Type
+val transaction_monad : monad transaction
-val return : t ::: Type
- -> t -> transaction t
-val bind : t1 ::: Type -> t2 ::: Type
- -> transaction t1 -> (t1 -> transaction t2)
- -> transaction t2
(** HTTP operations *)