packages feed

integer-types-0.0.0.0: integer-types.cabal

cabal-version: 3.0

name: integer-types
version: 0.0.0.0

category: Numeric
synopsis: Integer, Natural, and Positive

description:
    The base package contains two unbounded integral types:
    Integer (-∞, ∞) and Natural (0, ∞). This package expands that
    integral repertoire with the addition of Positive (1, ∞).

author: Chris Martin
maintainer: Chris Martin, Julie Moronuki

homepage: https://github.com/typeclasses/integer-types
bug-reports: https://github.com/typeclasses/integer-types/issues

license: Apache-2.0
license-file: license.txt

extra-doc-files: readme.md changelog.md

common base
    default-language: GHC2021
    ghc-options: -Wall
    default-extensions:
        MultiParamTypeClasses
        NoGeneralizedNewtypeDeriving
        NoImplicitPrelude
        PatternSynonyms
        ViewPatterns
    build-depends:
        base ^>= 4.16 || ^>= 4.17
      , deepseq ^>= 1.4.6

common test
    import: base
    default-extensions:
        AllowAmbiguousTypes
    build-depends:
        exceptions
      , integer-types

common test-with-hedgehog
    import: test
    build-depends:
        hedgehog ^>= 1.1 || ^>= 1.2

common test-with-hspec
    import: test
    build-depends:
        hspec

library
    import: base
    hs-source-dirs: integer-types
    exposed-modules:
        Integer
        Integer.BoundedBelow
        Integer.Conversion
        Integer.Finite
        Integer.Integer
        Integer.Natural
        Integer.Positive
        Integer.Sign
        Integer.Signed
        Integer.Subtraction
    other-modules:
        Integer.Positive.Unsafe

library integer-generators
    import: test-with-hedgehog
    hs-source-dirs: integer-generators
    exposed-modules: Integer.Gen

test-suite test-integer-arithmetic
    import: test-with-hedgehog
    type: exitcode-stdio-1.0
    main-is: Main.hs
    hs-source-dirs: test-integer-arithmetic
    build-depends: integer-generators

test-suite test-integer-conversions
    import: test-with-hedgehog
    type: exitcode-stdio-1.0
    main-is: Main.hs
    hs-source-dirs: test-integer-conversions
    build-depends: integer-generators

test-suite test-integer-enum
    import: test-with-hspec
    type: exitcode-stdio-1.0
    main-is: Main.hs
    hs-source-dirs: test-integer-enum

test-suite test-integer-deepseq
    import: test-with-hspec
    type: exitcode-stdio-1.0
    main-is: Main.hs
    hs-source-dirs: test-integer-deepseq

test-suite test-integer-finite
    import: test-with-hedgehog
    type: exitcode-stdio-1.0
    main-is: Main.hs
    hs-source-dirs: test-integer-finite
    build-depends: integer-generators