aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/control/region.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/control/region.lux')
-rw-r--r--stdlib/source/library/lux/control/region.lux16
1 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/source/library/lux/control/region.lux b/stdlib/source/library/lux/control/region.lux
index daf4b33d3..d84f0e027 100644
--- a/stdlib/source/library/lux/control/region.lux
+++ b/stdlib/source/library/lux/control/region.lux
@@ -19,8 +19,8 @@
(-> r (! (Try Any))))
(type: .public (Region r ! a)
- {#.doc (doc "A region where resources may be be claimed and where a side-effecting computation may be performed."
- "Every resource is paired with a function that knows how to clean/reclaim it, to make sure there are no leaks.")}
+ {#.doc (example "A region where resources may be be claimed and where a side-effecting computation may be performed."
+ "Every resource is paired with a function that knows how to clean/reclaim it, to make sure there are no leaks.")}
(-> [r (List (Cleaner r !))]
(! [(List (Cleaner r !))
(Try a)])))
@@ -53,8 +53,8 @@
(#try.Failure error)
(exception.except ..clean_up_error [error output])))
-(def: .public (run monad computation)
- {#.doc (doc "Executes a region-based computation, with a side-effect determined by the monad.")}
+(def: .public (run! monad computation)
+ {#.doc (example "Executes a region-based computation, with a side-effect determined by the monad.")}
(All [! a]
(-> (Monad !) (All [r] (Region r ! a))
(! (Try a))))
@@ -65,7 +65,7 @@
(\ ! map (list\fold clean output)))))
(def: .public (acquire monad cleaner value)
- {#.doc (doc "Acquire a resource while pairing it a function that knows how to reclaim it.")}
+ {#.doc (example "Acquire a resource while pairing it a function that knows how to reclaim it.")}
(All [! a] (-> (Monad !) (-> a (! (Try Any))) a
(All [r] (Region r ! a))))
(function (_ [region cleaners])
@@ -140,7 +140,7 @@
(in [cleaners (#try.Failure error)]))))))
(def: .public (failure monad error)
- {#.doc (doc "Immediately fail with this 'message'.")}
+ {#.doc (example "Immediately fail with this 'message'.")}
(All [! a]
(-> (Monad !) Text
(All [r] (Region r ! a))))
@@ -148,14 +148,14 @@
(\ monad in [cleaners (#try.Failure error)])))
(def: .public (except monad exception message)
- {#.doc (doc "Fail by throwing/raising an exception.")}
+ {#.doc (example "Fail by throwing/raising an exception.")}
(All [! e a]
(-> (Monad !) (Exception e) e
(All [r] (Region r ! a))))
(failure monad (exception.error exception message)))
(def: .public (lift monad operation)
- {#.doc (doc "Lift an effectful computation into a region-based computation.")}
+ {#.doc (example "Lift an effectful computation into a region-based computation.")}
(All [! a]
(-> (Monad !) (! a)
(All [r] (Region r ! a))))