packages feed

number-length-0.1.0.0: number-length.cabal

name:                   number-length
version:                0.1.0.0
synopsis:
  Number of digits in a number in decimal and hexadecimal representation.
description:
  There are situations when it is necessary to know the length of a number in
  decimal or hexadecimal form. In example when allocating buffer while
  serializing a number in to binary or human readable format.

homepage:               https://github.com/trskop/number-length
license:                BSD3
license-file:           LICENSE
author:                 Peter Trško
maintainer:             peter.trsko@gmail.com
copyright:              (c) 2015-2016, Peter Trško
category:               Data
build-type:             Simple
cabal-version:          >=1.10

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

flag pedantic
  description:          Pass additional warning flags to GHC.
  default:              False
  manual:               True

flag old-base
  description:          Supplement Data.Proxy, which is available since
                        base >=4.7, using tagged package.
  default:              False
  manual:               False

library
  hs-source-dirs:       src
  exposed-modules:
      Data.NumberLength
    , Data.NumberLength.Int
    , Data.NumberLength.Internal
    , Data.NumberLength.Word
  -- other-modules:

  default-language:     Haskell2010
  other-extensions:     NoImplicitPrelude

  if flag(old-base)
    build-depends:
        base >=4.5 && <4.7
      , tagged >=0.6 && <0.9
  else
    build-depends:
        base >=4.7 && <5

  ghc-options:          -Wall -fwarn-tabs

  if flag(pedantic)
    ghc-options:
      -fwarn-implicit-prelude
      -fwarn-missing-import-lists
--    -Werror

test-suite unit-tests
  hs-source-dirs:       src, test
  type:                 exitcode-stdio-1.0
  main-is:              unit-tests.hs
  other-modules:
      TestCase
    , TestCase.Data.NumberLength
    , TestCase.Data.NumberLength.Int
    , TestCase.Data.NumberLength.Word

  default-language:     Haskell2010
  other-extensions:     DefaultSignatures, NoImplicitPrelude

  build-depends:
    -- {{{ Test-suite dependencies --------------------------------------------
      HUnit >=1.2 && <2
      -- ^ Same constraints as test-framework-hunit
    , QuickCheck >=2.6 && <2.9
      -- ^ Same constraints as test-framework-quickcheck2==0.3.0.3.
    , test-framework >=0.8 && <1
      -- ^ Same constraint as test-framework-skip, other packages that
      -- depend on it have less restrictive bounds.
    , test-framework-hunit >=0.2.6 && <1
      -- ^ Lower versions have more restrictive bounds on test-framework.
    , test-framework-quickcheck2 >=0.3
      -- ^ There were changes in QuickCheck bounds in 0.2 branch and last one
      -- on it had a compilation failure on Hackage.
    -- }}} Test-suite dependencies --------------------------------------------

  if flag(old-base)
    build-depends:
        base >=4.5 && <4.7
      , tagged >=0.6 && <0.9
  else
    build-depends:
        base >=4.7 && <5

  ghc-options:          -Wall -fwarn-tabs

  if flag(pedantic)
    ghc-options:
      -fwarn-implicit-prelude
      -fwarn-missing-import-lists
--    -Werror

benchmark benchmark
  hs-source-dirs:       src, test
  type:                 exitcode-stdio-1.0
  main-is:              benchmark.hs
--other-modules:

  default-language:     Haskell2010
  other-extensions:     NoImplicitPrelude

  -- {{{ Dependencies of the library ------------------------------------------
  if flag(old-base)
    build-depends:
        base >=4.5 && <4.7
      , tagged >=0.6 && <0.9
  else
    build-depends:
        base >=4.7 && <5
  -- }}} Dependencies of the library ------------------------------------------

  build-depends:
      criterion >= 1.0.0.0 && < 2
    , number-length

  ghc-options:          -Wall -fwarn-tabs

  if flag(pedantic)
    ghc-options:
      -fwarn-implicit-prelude
      -fwarn-missing-import-lists
--    -Werror

source-repository head
  type:                 git
  location:             git://github.com/trskop/number-length.git

source-repository this
  type:                 git
  location:             git://github.com/trskop/number-length.git
  tag:                  v0.1.0.0