packages feed

postgresql-simple-interval-0.2025.7.9: postgresql-simple-interval.cabal

cabal-version: 3.0
name: postgresql-simple-interval
version: 0.2025.7.9
synopsis: A simple interval type for PostgreSQL.
description:
  This library provides a simple interval type for PostgreSQL. It supports
  round-tripping through Postgres without losing information.

category: Database
license: 0BSD
license-file: LICENSE.txt
maintainer: Mercury Technologies, Inc.
extra-doc-files:
  CHANGELOG.md
  README.md

source-repository head
  location: https://github.com/MercuryTechnologies/postgresql-simple-interval
  type: git

flag pedantic
  default: False
  manual: True

common library
  build-depends:
    attoparsec ^>=0.14.4,
    base ^>={4.19, 4.20, 4.21},
    bytestring ^>=0.12.1,

  default-language: Haskell2010
  ghc-options:
    -Weverything
    -Wno-all-missed-specialisations
    -Wno-implicit-prelude
    -Wno-missing-deriving-strategies
    -Wno-missing-export-lists
    -Wno-missing-kind-signatures
    -Wno-missing-safe-haskell-mode
    -Wno-prepositive-qualified-module
    -Wno-safe
    -Wno-unsafe

  if flag(pedantic)
    ghc-options: -Werror

common executable
  import: library
  build-depends: postgresql-simple-interval
  ghc-options:
    -rtsopts
    -threaded

library
  import: library
  build-depends:
    postgresql-simple ^>=0.7,
    scientific ^>=0.3.8,

  -- cabal-gild: discover source/library
  exposed-modules:
    Database.PostgreSQL.Interval
    Database.PostgreSQL.Interval.Unstable

  hs-source-dirs: source/library

test-suite postgresql-simple-interval-test-suite
  import: executable
  build-depends: hspec ^>=2.11.12
  hs-source-dirs: source/test-suite
  main-is: Main.hs
  type: exitcode-stdio-1.0