packages feed

safe-money-0.4: safe-money.cabal

name: safe-money
version: 0.4
license: BSD3
license-file: LICENSE
copyright: Copyright (c) Renzo Carbonara 2016-2017
author: Renzo Carbonara
maintainer: renλren!zone
stability: Experimental
tested-with: GHC==8.2.2, GHC==8.0.2, GHCJS
homepage: https://github.com/k0001/safe-money
bug-reports: https://github.com/k0001/safe-money/issues
category: Money
build-type: Simple
cabal-version: >=1.10
extra-source-files: README.md changelog.md
synopsis:
  Type-safe and lossless encoding and manipulation of money, fiat currencies,
  crypto currencies and precious metals.
description:
  Type-safe and lossless encoding and manipulation of money, fiat currencies,
  crypto currencies and precious metals.
  .
  NOTICE that the only mandatory dependencies of this package are @base@ and
  @constraints@. The rest of the dependencies are OPTIONAL but enabled by
  default (except @store@ which is also disabled when building with GHCJS), they
  can be disabled with Cabal flags.

source-repository head
  type: git
  location: https://github.com/k0001/safe-money

library
  default-language: Haskell2010
  hs-source-dirs: src
  ghc-options: -Wall -O2
  exposed-modules: Money
  other-modules: Money.Internal
  build-depends: base (>=4.8 && <5.0), constraints

  if flag(aeson)
    build-depends: aeson (>=0.9)
    cpp-options: -DHAS_aeson
  if flag(binary)
    build-depends: binary (>=0.7)
    cpp-options: -DHAS_binary
  if flag(cereal)
    build-depends: cereal (>=0.5)
    cpp-options: -DHAS_cereal
  if flag(deepseq)
    build-depends: deepseq (>=1.4)
    cpp-options: -DHAS_deepseq
  if flag(hashable)
    build-depends: hashable (>=1.2)
    cpp-options: -DHAS_hashable
  if flag(serialise)
    build-depends: serialise (>=0.2)
    cpp-options: -DHAS_serialise
  if (flag(store) && !impl(ghcjs))
    build-depends: store (>=0.2)
    cpp-options: -DHAS_store
  if flag(xmlbf)
    build-depends: xmlbf (>=0.2), text
    cpp-options: -DHAS_xmlbf

test-suite test
  default-language: Haskell2010
  type: exitcode-stdio-1.0
  hs-source-dirs: test
  main-is: Main.hs
  build-depends:
    base,
    bytestring,
    constraints,
    safe-money,
    tasty,
    tasty-hunit,
    tasty-quickcheck

  if flag(aeson)
    build-depends: aeson
    cpp-options: -DHAS_aeson
  if flag(binary)
    build-depends: binary
    cpp-options: -DHAS_binary
  if flag(cereal)
    build-depends: cereal
    cpp-options: -DHAS_cereal
  if flag(deepseq)
    build-depends: deepseq
    cpp-options: -DHAS_deepseq
  if flag(hashable)
    build-depends: hashable
    cpp-options: -DHAS_hashable
  if flag(serialise)
    build-depends: serialise
    cpp-options: -DHAS_serialise
  if (flag(store) && !impl(ghcjs))
    build-depends: store
    cpp-options: -DHAS_store
  if flag(xmlbf)
    build-depends: xmlbf, text
    cpp-options: -DHAS_xmlbf

flag aeson
  description: Provide instances for @aeson@
  default: True
  manual: True
flag binary
  description: Provide instances for @binary@
  default: True
  manual: True
flag cereal
  description: Provide instances for @cereal@
  default: True
  manual: True
flag store
  description: Provide instances for @store@
  default: True
  manual: True
flag deepseq
  description: Provide instances for @deepseq@
  default: True
  manual: True
flag hashable
  description: Provide instances for @hashable@
  default: True
  manual: True
flag serialise
  description: Provide instances for @serialise@
  default: True
  manual: True
flag xmlbf
  description: Provide instances for @xmlbf@
  default: True
  manual: True