packages feed

country-0.2.4.2: country.cabal

cabal-version:   3.0
name:            country
version:         0.2.4.2
synopsis:        Country data type and functions
description:
  The `country` library provides a data type for dealing with
  the set of countries as defined by ISO 3166. The representation
  is compact and is well-suited to use with vectors and
  primitive arrays. Additionally, this library exports functions
  that provide the following encodings and decodings:
  .
  * ISO Alpha-2 (two-letter country code)
  .
  * ISO Alpha-3 (three-letter country code)
  .
  * ISO Numeric (three-digit country code)
  .
  .
  The main differences between this library and `iso3166-country-codes` are:
  .
  * it doesn't use an ADT to represent countries, instead it uses the country's three-digit country code.
  .
  * it doesn't use `String` for encoding/decoding
  .
  * it provides two-alpha and three-alpha country codes.
  .
  * it provides `Prim` instances from the `primitive` package to allow types to be used in unboxed vectors/arrays.
  .
  * BSD3 licence instead of LGPL
  .
  Please open up an issue on github if there is anything
  you would like to see added.

homepage:        https://github.com/byteverse/country
bug-reports:     https://github.com/byteverse/country/issues
license:         BSD-3-Clause
license-file:    LICENSE
author:          Andrew Martin
maintainer:      amartin@layer3com.com
copyright:       2017 Andrew Martin
category:        Web
build-type:      Simple
extra-doc-files:
  CHANGELOG.md
  README.md

tested-with:     GHC ==9.4.8 || ==9.6.3 || ==9.8.1

common build-settings
  default-language: Haskell2010
  ghc-options:      -Wall -Wunused-packages

library
  import:          build-settings
  hs-source-dirs:  src
  exposed-modules:
    Continent
    Continent.Unsafe
    Country
    Country.Identifier
    Country.Subdivision
    Country.Unsafe

  other-modules:
    Country.Unexposed.Alias
    Country.Unexposed.AlphaTwoPtr
    Country.Unexposed.Continents
    Country.Unexposed.Encode.English
    Country.Unexposed.Names
    Country.Unexposed.Subdivision
    Country.Unexposed.Trie
    Country.Unexposed.TrieByte
    Country.Unexposed.Util

  build-depends:
    , aeson                 >=1.2     && <2.3
    , attoparsec            >=0.13    && <0.15
    , base                  >=4.9     && <5
    , bytebuild             >=0.3.4   && <0.4
    , bytehash              >=0.1.1   && <0.2
    , byteslice             >=0.2.3   && <0.3
    , bytestring            >=0.10
    , contiguous            >=0.6.1
    , deepseq               >=1.3.0.2 && <1.6
    , hashable              >=1.2     && <1.5
    , primitive             >=0.6.4   && <0.10
    , primitive-unlifted    >=2.1
    , scientific            >=0.3     && <0.4
    , text                  >=2.0     && <2.2
    , text-short            >=0.1.3
    , unordered-containers  >=0.2     && <0.3

  ghc-options:     -O2

test-suite test
  import:         build-settings
  type:           exitcode-stdio-1.0
  hs-source-dirs: test
  main-is:        Spec.hs
  build-depends:
    , base
    , byteslice
    , country
    , primitive
    , QuickCheck
    , quickcheck-classes  >=0.6.4
    , tasty
    , tasty-quickcheck
    , text
    , text-short

benchmark bench
  import:         build-settings
  type:           exitcode-stdio-1.0
  build-depends:
    , base
    , country
    , gauge
    , text     >=1.2

  ghc-options:    -O2
  hs-source-dirs: bench
  main-is:        Main.hs

benchmark bench-size
  import:         build-settings
  type:           exitcode-stdio-1.0
  build-depends:
    , base
    , bytehash
    , bytestring
    , compact
    , country

  ghc-options:    -O2
  hs-source-dirs: bench
  main-is:        Size.hs

source-repository head
  type:     git
  location: git://github.com/byteverse/country.git