mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
small fixes
This commit is contained in:
parent
1d2780794f
commit
ceb68ee15f
4 changed files with 9 additions and 7 deletions
2
_oasis
2
_oasis
|
|
@ -201,7 +201,7 @@ Executable run_qtest
|
||||||
Install: false
|
Install: false
|
||||||
CompiledObject: best
|
CompiledObject: best
|
||||||
MainIs: run_qtest.ml
|
MainIs: run_qtest.ml
|
||||||
Build$: flag(tests) && flag(bigarray) && flag(unix)
|
Build$: flag(tests) && flag(bigarray) && flag(unix) && flag(advanced)
|
||||||
BuildDepends: containers, containers.misc, containers.string, containers.iter,
|
BuildDepends: containers, containers.misc, containers.string, containers.iter,
|
||||||
containers.io, containers.advanced, containers.sexp,
|
containers.io, containers.advanced, containers.sexp,
|
||||||
containers.bigarray, containers.unix,
|
containers.bigarray, containers.unix,
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ module B = Benchmark
|
||||||
let (@>) = B.Tree.(@>)
|
let (@>) = B.Tree.(@>)
|
||||||
let (@>>) = B.Tree.(@>>)
|
let (@>>) = B.Tree.(@>>)
|
||||||
let (@>>>) = B.Tree.(@>>>)
|
let (@>>>) = B.Tree.(@>>>)
|
||||||
|
let (|>) = CCFun.(|>)
|
||||||
|
|
||||||
let app_int f n = string_of_int n @> lazy (f n)
|
let app_int f n = string_of_int n @> lazy (f n)
|
||||||
let app_ints f l = B.Tree.concat (List.map (app_int f) l)
|
let app_ints f l = B.Tree.concat (List.map (app_int f) l)
|
||||||
|
|
|
||||||
|
|
@ -74,20 +74,20 @@ type ('a, +'perm) t constraint 'perm = [< `r | `w]
|
||||||
|
|
||||||
type ('a, 'perm) pipe = ('a, 'perm) t
|
type ('a, 'perm) pipe = ('a, 'perm) t
|
||||||
|
|
||||||
val keep : _ t -> unit Lwt.t -> unit
|
val keep : (_,_) t -> unit Lwt.t -> unit
|
||||||
(** [keep p fut] adds a pointer from [p] to [fut] so that [fut] is not
|
(** [keep p fut] adds a pointer from [p] to [fut] so that [fut] is not
|
||||||
garbage-collected before [p] *)
|
garbage-collected before [p] *)
|
||||||
|
|
||||||
val is_closed : _ t -> bool
|
val is_closed : (_,_) t -> bool
|
||||||
|
|
||||||
val close : _ t -> unit Lwt.t
|
val close : (_,_) t -> unit Lwt.t
|
||||||
(** [close p] closes [p], which will not accept input anymore.
|
(** [close p] closes [p], which will not accept input anymore.
|
||||||
This sends [`End] to all readers connected to [p] *)
|
This sends [`End] to all readers connected to [p] *)
|
||||||
|
|
||||||
val close_async : _ t -> unit
|
val close_async : (_,_) t -> unit
|
||||||
(** Same as {!close} but closes in the background *)
|
(** Same as {!close} but closes in the background *)
|
||||||
|
|
||||||
val wait : _ t -> unit Lwt.t
|
val wait : (_,_) t -> unit Lwt.t
|
||||||
(** Evaluates once the pipe closes *)
|
(** Evaluates once the pipe closes *)
|
||||||
|
|
||||||
val create : ?max_size:int -> unit -> ('a, 'perm) t
|
val create : ?max_size:int -> unit -> ('a, 'perm) t
|
||||||
|
|
@ -101,7 +101,7 @@ val connect : ?ownership:[`None | `InOwnsOut | `OutOwnsIn] ->
|
||||||
@param own determines which pipes owns which (the owner, when it
|
@param own determines which pipes owns which (the owner, when it
|
||||||
closes, also closes the ownee) *)
|
closes, also closes the ownee) *)
|
||||||
|
|
||||||
val link_close : _ t -> after:_ t -> unit
|
val link_close : (_,_) t -> after:(_,_) t -> unit
|
||||||
(** [link_close p ~after] will close [p] when [after] closes.
|
(** [link_close p ~after] will close [p] when [after] closes.
|
||||||
if [after] is closed already, closes [p] immediately *)
|
if [after] is closed already, closes [p] immediately *)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@ module Logical (P:Param) = struct
|
||||||
| Zero e -> f e
|
| Zero e -> f e
|
||||||
| Plus (a1, f1) ->
|
| Plus (a1, f1) ->
|
||||||
plus a1 (fun e -> plus (f1 e) f)
|
plus a1 (fun e -> plus (f1 e) f)
|
||||||
|
| _ -> Plus (a, f)
|
||||||
|
|
||||||
let split x = Split x
|
let split x = Split x
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue