cabal-version: 3.0 name: hasql-postgresql-types version: 0.1.0.1 category: PostgreSQL, Codecs, Hasql synopsis: Integration of "hasql" with "postgresql-types" description: Provides automatic encoder and decoder generation for ["hasql"](https://hackage.haskell.org/package/hasql), supporting all PostgreSQL types defined in the ["postgresql-types"](https://hackage.haskell.org/package/postgresql-types) package. == Motivation The standard "hasql" codecs use common Haskell types like `Text`, `DiffTime`, `UTCTime`, etc. However these types do not always map precisely to PostgreSQL types. E.g., the PostgreSQL `interval` type carries information about months, years and microseconds, while the Haskell `DiffTime` type only represents a time difference in picoseconds. Such mismatches can lead to data loss or unexpected behavior. The ["postgresql-types"](https://github.com/nikita-volkov/postgresql-types) library addresses such issues by providing precise Haskell representations for PostgreSQL types. This package integrates it with "hasql". It also provides a class-based polymorphic interface for defining "hasql" `Value` codecs. homepage: https://github.com/nikita-volkov/hasql-postgresql-types bug-reports: https://github.com/nikita-volkov/hasql-postgresql-types/issues author: Nikita Volkov maintainer: Nikita Volkov copyright: (c) 2026, Nikita Volkov license: MIT license-file: LICENSE extra-doc-files: LICENSE README.md source-repository head type: git location: https://github.com/nikita-volkov/hasql-postgresql-types common base default-language: Haskell2010 default-extensions: ApplicativeDo BangPatterns BinaryLiterals BlockArguments ConstraintKinds DataKinds DefaultSignatures DeriveDataTypeable DeriveFoldable DeriveFunctor DeriveTraversable DerivingStrategies DerivingVia DuplicateRecordFields EmptyDataDecls FlexibleContexts FlexibleInstances FunctionalDependencies GADTs GeneralizedNewtypeDeriving LambdaCase LiberalTypeSynonyms MagicHash MultiParamTypeClasses MultiWayIf NamedFieldPuns NoImplicitPrelude NoMonomorphismRestriction NumericUnderscores OverloadedStrings ParallelListComp PatternGuards QuasiQuotes RankNTypes RecordWildCards ScopedTypeVariables StandaloneDeriving StrictData TemplateHaskell TupleSections TypeApplications TypeFamilies TypeOperators UnboxedTuples ViewPatterns common executable import: base ghc-options: -O2 -threaded -with-rtsopts=-N -rtsopts -funbox-strict-fields common test import: base ghc-options: -threaded -with-rtsopts=-N library import: base hs-source-dirs: src/library exposed-modules: Hasql.PostgresqlTypes build-depends: base >=4.11 && <5, hasql ^>=1.10.1, postgresql-types-algebra ^>=0.1, ptr-peeker ^>=0.1.0.1, ptr-poker ^>=0.1.3, tagged ^>=0.8.9, text-builder ^>=1.0.0.4,