cd /news/developer-tools/rel8-1-8-released · home topics developer-tools article
[ARTICLE · art-136512] src=discourse.haskell.org ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

Rel8 1.8 released!

The Rel8 team released Rel8 1.8, a Haskell library for interacting with PostgreSQL built on top of Opaleye, adding Rel8.TH.deriveRel8able and Rel8.TH.deriveRel8ables for deriving Rel8able instances via TemplateHaskell. The release notes state the new TemplateHaskell deriving can be significantly faster than Generics, with testing showing 80% reductions in build time. Rel8 1.8 also adds Conflict and Index types, notElem and notElem1 to Rel8.Array, preliminary PostgreSQL range support, GHC-9.14 support, and requires at least opaleye version 0.10.8.0.

read2 min views1 publishedSep 22, 2026
Rel8 1.8 released!
Image: Discourse (auto-discovered)

TeofilC 1

Hi folks!

We’re happy to announce the release of Rel8 1.8 ! Rel8 is a Haskell library for interacting with PostgreSQL databases, built on top of the fantastic Opaleye library.

The main objectives of Rel8 are:

  • Conciseness: Users using Rel8 should not need to write boiler-plate code. By using expressive types, we can provide sufficient information for the compiler to infer code whenever possible.
  • Inferrable: Despite using a lot of type level magic, Rel8 aims to have excellent and predictable type inference.
  • Familiar: writing Rel8 queries should feel like normal Haskell programming.

I would like to highlight the new TH deriving functionality. This has been a long time coming, and can give very significant compile-time improvements. In the wild, I have seen it reduce the time taken to compile a module by 80%. It doesn’t yet support all of the use-cases of Generics deriving and is somewhat experimental, so feedback is greatly appreciated!

If you encounter any issues please let us know. Here’s the full changelog for this release:

#

Added Rel8.TH.deriveRel8able andRel8.TH.deriveRel8ables for derivingRel8able instances usingTemplateHaskell . This can be significantly faster than usingGenerics . In testing, we have seen 80% reductions in build time! #

Expose all rel8 internal modules from therel8-internal package. #

Added new Conflict andIndex types.Conflict represents aconflict_target in anON CONFLICT . It can be either a named constraint (ON CONSTRAINT ) or a anIndex . #

Added Index .Index is a description of a unique index which PostgreSQL can use forunique index inference . This is an alternative to specifying an explicit named constraint in aconflict_target . #

Add notElem andnotElem1 toRel8.Array #

Added preliminary support for PostgreSQL ranges. #

Support GHC-9.14 and semialign >= 1.4 . #

Added notElem andnotElem1 toRel8.Array . #

Added DBType Aeson.Object instance. #

Bumped a variety of bounds.

#

The Upsert type was changed. Previously it had the columns (index ,predicate ) of what is now theIndex type baked into its record. It now instead has a singleconflict column (of typeConflict , which can be either anIndex or a named constraint). #

The DoNothing constructor ofOnConflict was changed to also take an optionalConflict value. Even thoughON CONFLICT DO NOTHING does not generally require aconflict_target , there are cases where it can be necessary, e.g., if you have table that has both deferrable and non-deferrable constraints. #

rel8 now requires at least version0.10.8.0 ofopaleye

#

elem andelem1 now useIS NOT DISTINCT FROM semantics (matching(==.) ) when the element type is nullable, sonull is found in an array containingnull . Previously they were implemented with the array containment operator<@ , which never matchesnull . #

Fixed some issues around the truncation of long column names. #

Improved documentation.

21 Likes

jackdk 2

rel8 is my favourite Haskell DB library because it’s managed to avoid becoming a type labyrinth most of the time, but you still get a lot of power and safety. Congrats on the new release.

── more in #developer-tools 4 stories · sorted by recency
── more on @rel8 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/rel8-1-8-released] indexed:0 read:2min 2026-09-22 ·