package either

  1. Overview
  2. Docs
Compatibility Either module

Install

Dune Dependency

Authors

Maintainers

Sources

either-1.0.0.tbz
sha256=bf674de3312dee7b7215f07df1e8a96eb3d679164b8a918cdd95b8d97e505884
sha512=147854c09f897dd028b18a9f19acea8666107aaa7b1aab3c92f568af531364f57298edcaf3897d74246d3857d52e9bfb7ad0fc39220d988d9f14694ca1d5e9ed

Description

Projects that want to use the Either module defined in OCaml 4.12.0 while staying compatible with older versions of OCaml should use this library instead.

Published: 19 Nov 2020

README

Compatibility Either module

Projects that want to use the Either 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 Either to the standard library's definition of the module. Otherwise, it provides an equivalent definition of Either.

Depending on this library

Opam libraries depending on this module are encouraged to use a conditional dependency:

depends: [
  ("ocaml" {>= "4.12.0"} | "either")
]

This ensures that any dependencies of your library that don't need pre-4.12 compatibility will never transitively depend on either.


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.

Dependencies (2)

  1. ocaml
  2. dune >= "2.0"

Dev Dependencies

None

Used by (9)

  1. containers >= "3.6.1"
  2. data-encoding >= "0.5"
  3. moonpool
  4. ocamlformat = "0.19.0~4.13preview" | >= "0.20.0" & < "0.25.1"
  5. ocamlformat-lib
  6. ocamlformat-rpc >= "0.20.0" & < "0.21.0"
  7. opam-compiler >= "0.2.0"
  8. preface
  9. repr >= "0.2.1"

Conflicts

None

OCaml

Innovation. Community. Security.