cabal-version: 2.2
build-type:    Custom

name:          multibase
version:       0.1.2
synopsis:      Self-identifying base encodings, implementation of <https://github.com/multiformats/multihash>
homepage:      https://github.com/oscoin/ipfs
bug-reports:   https://github.com/oscoin/ipfs/issues
license:       BSD-3-Clause
license-file:  LICENSE
author:        Kim Altintop
maintainer:    Kim Altintop <kim@monadic.xyz>, Monadic Team <team@monadic.xyz>
copyright:     2018 Monadic GmbH

category:      Data

extra-source-files:
      CHANGELOG.md
    , README.md

source-repository head
    type: git
    location: https://github.com/oscoin/ipfs

custom-setup
    setup-depends:
        base >= 4.9 && < 5
      , Cabal
      , cabal-doctest >= 1

common common
    default-language: Haskell2010
    ghc-options:
        -Wall
        -Wcompat
        -Wincomplete-uni-patterns
        -Wincomplete-record-updates
        -Wredundant-constraints
        -fprint-expanded-synonyms
        -funbox-small-strict-fields

library
    import: common
    hs-source-dirs: src
    exposed-modules:
        Data.ByteString.BaseN
        Data.ByteString.Multibase

    build-depends:
      , aeson
      , base >= 4.9 && < 5
      , base16-bytestring >= 1.0.0.0 && < 2.0.0.0
      , base32-z-bytestring
      , base58-bytestring
      , base64-bytestring
      , bytestring
      , deepseq
      , formatting
      , hashable
      , sandi
      , serialise
      , tagged
      , text

test-suite doctests
    import: common
    main-is: Main.hs
    hs-source-dirs: test/doctests
    type: exitcode-stdio-1.0

    other-modules:   Build_doctests
    autogen-modules: Build_doctests

    build-depends:
        base
      , doctest
      , multibase
      , QuickCheck
      , template-haskell

    ghc-options:
        -threaded
        -rtsopts
        -with-rtsopts=-N