mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
parent
78ef007b77
commit
7d1862a501
4 changed files with 56 additions and 31 deletions
|
|
@ -13,6 +13,7 @@ depends: [
|
|||
"dune"
|
||||
"result"
|
||||
"uchar"
|
||||
"seq"
|
||||
"qtest" { with-test }
|
||||
"qcheck" { with-test }
|
||||
"ounit" { with-test }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
(* This file is free software, part of containers. See file "license" for more details. *)
|
||||
|
||||
(** {1 Options} *)
|
||||
|
|
@ -210,6 +209,10 @@ let to_iter o k = match o with
|
|||
|
||||
let to_seq = to_iter
|
||||
|
||||
let to_std_seq o () = match o with
|
||||
| None -> Seq.Nil
|
||||
| Some x -> Seq.Cons (x, Seq.empty)
|
||||
|
||||
let pp ppx out = function
|
||||
| None -> Format.pp_print_string out "None"
|
||||
| Some x -> Format.fprintf out "@[Some %a@]" ppx x
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
(* This file is free software, part of containers. See file "license" for more details. *)
|
||||
|
||||
(** {1 Options} *)
|
||||
|
|
@ -187,6 +186,10 @@ val choice_seq : 'a t sequence -> 'a t
|
|||
|
||||
val to_gen : 'a t -> 'a gen
|
||||
|
||||
val to_std_seq : 'a t -> 'a Seq.t
|
||||
(** Same as {!Stdlib.Option.to_seq}
|
||||
@since NEXT_RELEASE *)
|
||||
|
||||
val to_iter : 'a t -> 'a sequence
|
||||
(** Returns an internal iterator, like in the library [Iter].
|
||||
@since NEXT_RELEASE *)
|
||||
|
|
|
|||
|
|
@ -1,28 +1,42 @@
|
|||
(alias
|
||||
(name unlabel)
|
||||
(deps (:mli CCArrayLabels.mli) ../unlabel.exe)
|
||||
(action (run ../unlabel.exe %{mli} CCArray.mli)))
|
||||
(deps
|
||||
(:mli CCArrayLabels.mli)
|
||||
../unlabel.exe)
|
||||
(action
|
||||
(run ../unlabel.exe %{mli} CCArray.mli)))
|
||||
|
||||
(alias
|
||||
(name unlabel)
|
||||
(deps (:mli CCArray_sliceLabels.mli) ../unlabel.exe)
|
||||
(action (run ../unlabel.exe %{mli} CCArray_slice.mli)))
|
||||
(deps
|
||||
(:mli CCArray_sliceLabels.mli)
|
||||
../unlabel.exe)
|
||||
(action
|
||||
(run ../unlabel.exe %{mli} CCArray_slice.mli)))
|
||||
|
||||
(alias
|
||||
(name unlabel)
|
||||
(deps (:mli CCEqualLabels.mli) ../unlabel.exe)
|
||||
(action (run ../unlabel.exe %{mli} CCEqual.mli)))
|
||||
(deps
|
||||
(:mli CCEqualLabels.mli)
|
||||
../unlabel.exe)
|
||||
(action
|
||||
(run ../unlabel.exe %{mli} CCEqual.mli)))
|
||||
|
||||
(alias
|
||||
(name unlabel)
|
||||
(deps (:mli CCListLabels.mli) ../unlabel.exe)
|
||||
(action (run ../unlabel.exe %{mli} CCList.mli)))
|
||||
(deps
|
||||
(:mli CCListLabels.mli)
|
||||
../unlabel.exe)
|
||||
(action
|
||||
(run ../unlabel.exe %{mli} CCList.mli)))
|
||||
|
||||
(alias
|
||||
(name unlabel)
|
||||
(deps (:mli CCStringLabels.mli) ../unlabel.exe)
|
||||
(action (run ../unlabel.exe %{mli} CCString.mli)))
|
||||
|
||||
(deps
|
||||
(:mli CCStringLabels.mli)
|
||||
../unlabel.exe)
|
||||
(action
|
||||
(run ../unlabel.exe %{mli} CCString.mli)))
|
||||
|
||||
(executable
|
||||
(name mkshims)
|
||||
|
|
@ -30,15 +44,19 @@
|
|||
(libraries dune.configurator))
|
||||
|
||||
(rule
|
||||
(targets CCShims_.ml CCShimsList_.ml CCShimsFun_.ml CCShimsFun_.mli CCShimsArray_.ml CCShimsFormat_.ml)
|
||||
(targets CCShims_.ml CCShimsList_.ml CCShimsFun_.ml CCShimsFun_.mli
|
||||
CCShimsArray_.ml CCShimsFormat_.ml)
|
||||
(deps ./mkshims.exe)
|
||||
(action (run ./mkshims.exe)))
|
||||
(action
|
||||
(run ./mkshims.exe)))
|
||||
|
||||
(library
|
||||
(name containers)
|
||||
(public_name containers)
|
||||
(wrapped false)
|
||||
(modules :standard \ mkshims)
|
||||
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string -nolabels -open CCMonomorphic)
|
||||
(ocamlopt_flags (:include ../flambda.flags))
|
||||
(libraries result uchar containers.monomorphic))
|
||||
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string -nolabels -open
|
||||
CCMonomorphic)
|
||||
(ocamlopt_flags
|
||||
(:include ../flambda.flags))
|
||||
(libraries result uchar seq containers.monomorphic))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue