package ISO3166

All checked builds pass
  1. Overview
  2. Docs
OCaml library for working with ISO3166

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ISO3166-0.1.0.tbz
sha256=3f796838653b5d8df1772ca8c5e22aa2c02c832a83721738551ac6bc08b7ba4e
sha512=2c5fd35bf70b21a9ff80035a96f9d2cf88147e6684a4abbdd92103925ab8f7ba7843eb76f7cc1323c3e427c05eb11111c406a3f340f494130842000317399646

Description

This OCaml library provides an interface to the ISO3166 standard (a.k.a country codes)

Added to opam-repository:

README

OCaml ISO3166

This library provides a pure OCaml interface to working with the ISO 3166 standard (a.k.a country codes).

# ISO3166.alpha3_to_country `IRL |> ISO3166.Country.name;;
- : string = "Ireland"

The Country module already contains all of the countries for convenience named after the alpha2 country code.

# ISO3166.Country.fr |> ISO3166.Country.name;;
- : string = "France"
# ISO3166.Country.fr |> ISO3166.Country.numeric |> ISO3166.numeric_to_string;;
- : string = "250"

The original use-case for this library was to encode the conversion from alpha2 country codes to strings. Lots of public APIs that provide country-specific information use ISO3166 to distinguish between countries.

# ISO3166.alpha2_to_string `ES;;
- : string = "ES"

Data Source

The data that generates the OCaml file comes from https://github.com/lukes/ISO-3166-Countries-with-Regional-Codes/commit/6741ae83a08ce1802d22849db0a944d99e254bae which has the following disclaimer which applies to this library too.

Dependencies (2)

  1. dune >= "2.9"
  2. ocaml >= "4.03"

Dev Dependencies (2)

  1. odoc with-doc
  2. mdx with-test

Used by

None

Conflicts

None

Build status

Results of building ISO3166 with each compiler on check.ci.ocaml.org, run of against opam-repository 7cdc698. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.1.0 (this version) good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure