packages feed

ghc-typelits-presburger-0.7.4.2: ghc-typelits-presburger.cabal

cabal-version: 3.4
name: ghc-typelits-presburger
version: 0.7.4.2
synopsis: Presburger Arithmetic Solver for GHC Type-level natural numbers.
description:
  @ghc-typelits-presburger@ augments GHC type-system with Presburger
  Arithmetic Solver for Type-level natural numbers.
  This plugin only work with GHC builtin operations.
  To work with those of @singletons@ package, use @ghc-typelits-meta@ and/or @ghc-typelits-presburger@ instead.
  .
  Since 0.3.0.0, integration with <https://hackage.haskell.org/package/singletons singletons> package moves to <https://hackage.haskell.org/package/singletons-presburger singletons-presburger>.
  .
  You can use by adding this package to @build-depends@ and add the following pragma
  to the head of .hs files:
  .
  .
  > OPTIONS_GHC -fplugin GHC.TypeLits.Presburger

category: Math, Type System
homepage: https://github.com/konn/ghc-typelits-presburger#readme
bug-reports: https://github.com/konn/ghc-typelits-presburger/issues
author: Hiromi ISHII
maintainer: konn.jinro _at_ gmail.com
copyright: 2015-2025 (c) Hiromi ISHII
license: BSD-3-Clause
license-file: LICENSE
build-type: Simple
tested-with:
  ghc ==9.6.7
  ghc ==9.8.4
  ghc ==9.10.2
  ghc ==9.12.2

extra-source-files:
  Changelog.md

source-repository head
  type: git
  location: https://github.com/konn/ghc-typelits-presburger

flag examples
  description: Builds example
  manual: False
  default: False

common defaults
  autogen-modules: Paths_ghc_typelits_presburger
  other-modules: Paths_ghc_typelits_presburger
  default-language: Haskell2010
  ghc-options:
    -Wall
    -Wcompat
    -Widentities
    -Wincomplete-record-updates
    -Wincomplete-uni-patterns
    -Wmissing-export-lists
    -Wmissing-home-modules
    -Wpartial-fields
    -Wredundant-constraints
    -Wunused-packages

library
  import: defaults
  hs-source-dirs: src
  exposed-modules:
    GHC.TypeLits.Presburger
    GHC.TypeLits.Presburger.Compat
    GHC.TypeLits.Presburger.Types

  other-modules:
    Data.Integer.SAT
    GHC.TypeLits.Presburger.Flags

  build-depends:
    base >=4.7 && <5,
    containers,
    ghc <9.13,
    ghc-tcplugins-extra >=0.2 && <0.6,
    mtl,
    pretty,
    reflection,
    syb,
    transformers,

executable simple-arith-core
  import: defaults
  main-is: simple-arith-core.hs
  hs-source-dirs: examples
  build-depends:
    base,
    equational-reasoning,
    ghc-typelits-presburger,

  if !(flag(examples))
    buildable: False

test-suite test-typeltis-presburger
  import: defaults
  type: exitcode-stdio-1.0
  main-is: test.hs
  hs-source-dirs: test
  -- cabal-gild: discover test --exclude=test/test.hs
  other-modules:
    ErrorsNoPlugin
    ErrorsWithPlugin
    GHC.TypeLits.PresburgerSpec
    Shared

  build-tool-depends: tasty-discover:tasty-discover
  build-depends:
    base,
    equational-reasoning,
    ghc-typelits-presburger,
    tasty,
    tasty-discover,
    tasty-expected-failure,
    tasty-hunit,
    text,