cabal-version: 3.0name: hasql-postgresql-typesversion: 0.2.1.5category: PostgreSQL, Codecs, Hasqlsynopsis: 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-typesbug-reports: https://github.com/nikita-volkov/hasql-postgresql-types/issuesauthor: Nikita Volkov <nikita.y.volkov@mail.ru>maintainer: Nikita Volkov <nikita.y.volkov@mail.ru>copyright: (c) 2026, Nikita Volkovlicense: MITlicense-file: LICENSEextra-doc-files: CHANGELOG.md LICENSE README.mdsource-repository head type: git location: https://github.com/nikita-volkov/hasql-postgresql-typescommon 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 ViewPatternscommon executable import: base ghc-options: -O2 -threaded -with-rtsopts=-N -rtsopts -funbox-strict-fieldscommon test import: base ghc-options: -threaded -with-rtsopts=-Nlibrary import: base hs-source-dirs: src/library exposed-modules: Hasql.PostgresqlTypes other-modules: Hasql.PostgresqlTypes.Core build-depends: base >=4.11 && <5, hasql ^>=1.10.3 || ^>=2.0 || ^>=2.1 || ^>=2.2, hasql-mapping ^>=0.1.0.2 || ^>=0.1.1, postgresql-types ^>=0.1.5, postgresql-types-algebra ^>=0.2, ptr-peeker >=0.1.0.1 && <0.3, ptr-poker ^>=0.1.3, tagged ^>=0.8.9, text-builder ^>=1.0.0.4,