packages feed

hw-prim-bits-0.1.0.5: hw-prim-bits.cabal

cabal-version: 2.4

name:                   hw-prim-bits
version:                0.1.0.5
synopsis:               Primitive support for bit manipulation
description:            Primitive support for bit manipulation. Please see README.md
homepage:               https://github.com/githubuser/hw-prim-bits#readme
license:                BSD-3-Clause
license-file:           LICENSE
author:                 John Ky
maintainer:             newhoggy@gmail.com
copyright:              2017-2021 John Ky
category:               Data
tested-with:            GHC == 9.0.1, GHC == 8.10.7, GHC == 8.8.4, GHC == 8.6.5
build-type:             Simple
extra-source-files:     README.md

source-repository head
  type:     git
  location: https://github.com/haskell-works/hw-prim-bits

common base                 { build-depends: base                 >= 4          && < 5      }

common criterion            { build-depends: criterion                                      }
common doctest              { build-depends: doctest              >= 0.16.2     && < 0.19   }
common doctest-discover     { build-depends: doctest-discover     >= 0.2        && < 0.3    }
common hedgehog             { build-depends: hedgehog                                       }
common hspec                { build-depends: hspec                                          }
common hw-hedgehog          { build-depends: hw-hedgehog          >= 0.1.0.1                }
common hw-hspec-hedgehog    { build-depends: hw-hspec-hedgehog                              }
common QuickCheck           { build-depends: QuickCheck                                     }
common vector               { build-depends: vector                                         }

common config
  default-language:     Haskell2010

common hw-prim-bits
  build-depends:        hw-prim-bits

library
  import:               base, config
  hs-source-dirs:       src
  exposed-modules:      HaskellWorks.Prim.Bits
                      , HaskellWorks.Prim.Bits.Emul
                      , HaskellWorks.Prim.Bits.Fast
                      , HaskellWorks.Prim.Bits.Slow
  C-sources:            cbits/bits.c
  Include-dirs:         cbits
  Install-includes:     bits.h

executable hw-prim-bits-exe
  import:               base, config
                      , hw-prim-bits
  hs-source-dirs:       app
  main-is:              Main.hs
  ghc-options:          -threaded -rtsopts -with-rtsopts=-N

test-suite hw-prim-bits-test
  import:               base, config
                      , hedgehog
                      , hspec
                      , hw-hedgehog
                      , hw-hspec-hedgehog
                      , hw-prim-bits
                      , QuickCheck
  type:                 exitcode-stdio-1.0
  hs-source-dirs:       test
  main-is:              Spec.hs
  other-modules:        HaskellWorks.Prim.BitsSpec
  build-tool-depends:   hspec-discover:hspec-discover
  ghc-options:          -threaded -rtsopts -with-rtsopts=-N

benchmark bench
    import:             base, config
                      , criterion
                      , hw-prim-bits
                      , vector
    Type: exitcode-stdio-1.0
    HS-Source-Dirs: bench
    Main-Is: Main.hs
    GHC-Options: -Wall -O2

test-suite doctest
  import:               base, config
                      , doctest
                      , doctest-discover
                      , hw-prim-bits
  default-language:     Haskell2010
  type:                 exitcode-stdio-1.0
  ghc-options:          -threaded -rtsopts -with-rtsopts=-N
  main-is:              DoctestDriver.hs
  HS-Source-Dirs:       doctest
  build-tool-depends:   doctest-discover:doctest-discover