package semaphore-compat
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=e029d9daf5f5ec83e99e503b08d7aec5910a7c0e47168790bf01f4b4228d4676
sha512=1f37e88c95cf69119c3a7a77ff3a3196a861c28658896ca9981138d6a3faf3fb557d0085dcffc080beb60c1f1ac997df78e069772d5a699b3ea8b08214210e17
Description
Projects that want to use the Semaphore module defined in OCaml 4.12.0 while staying compatible with older versions of OCaml should use this library instead.
Published: 26 Sep 2024
README
Compatibility Semaphore
module
Projects that want to use the Semaphore
module defined in OCaml 4.12.0 while staying compatible with older versions of OCaml should use this library instead. On OCaml versions 4.12 and above, this library defines an alias Semaphore
to the standard library's definition of the module. Otherwise, it provides an equivalent definition of Semaphore
.
Depending on this library
Opam libraries depending on this module are encouraged to use a conditional dependency:
depends: [
("ocaml" {>= "4.12.0"} | "semaphore-compat")
]
This ensures that any dependencies of your library that don't need pre-4.12 compatibility will never transitively depend on semaphore-compat
.
Acknowledgements
This repository structure is mostly copied from JaneStreet/result
, which provides a compatibility result
type. Thanks to the OCaml maintainers for their improvements to the standard library.