{"slug": "rel8-1-8-released", "title": "Rel8 1.8 released!", "summary": "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.", "body_md": "[TeofilC](https://discourse.haskell.org/u/TeofilC)\n1\n \nHi folks!\n\nWe’re happy to announce the release of [Rel8 1.8](https://hackage.haskell.org/package/rel8-1.8.0.0) !  Rel8 is a Haskell library for interacting with PostgreSQL databases, built on top of the fantastic Opaleye library.\n\nThe main objectives of Rel8 are:\n\n- 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.\n- Inferrable: Despite using a lot of type level magic, Rel8 aims to have excellent and predictable type inference.\n- Familiar: writing Rel8 queries should feel like normal Haskell programming.\n\nI 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!\n\nIf you encounter any issues please [let us know](https://github.com/circuithub/rel8/issues).\n\nHere’s the full changelog for this release:\n\n## \n\n- \nAdded `Rel8.TH.deriveRel8able` and`Rel8.TH.deriveRel8ables` for deriving`Rel8able` instances using`TemplateHaskell` .\n This can be significantly faster than using`Generics` . In testing, we have seen 80% reductions in build time!\n- \nExpose all `rel8` internal modules from the`rel8-internal` package.\n- \nAdded new `Conflict` and`Index` types.`Conflict` represents a[`conflict_target`](https://www.postgresql.org/docs/current/sql-insert.html#SQL-ON-CONFLICT) in an`ON CONFLICT` . It can be either a named constraint (`ON CONSTRAINT` ) or a an`Index` .\n- \nAdded `Index` .`Index` is a description of a unique index which PostgreSQL can use for*unique index inference* . This is an alternative to specifying an explicit named constraint in a`conflict_target` .\n- \nAdd `notElem` and`notElem1` to`Rel8.Array`\n- \nAdded preliminary support for PostgreSQL ranges.\n- \nSupport GHC-9.14 and `semialign >= 1.4` .\n- \nAdded `notElem` and`notElem1` to`Rel8.Array` .\n- \nAdded `DBType Aeson.Object` instance.\n- \nBumped a variety of bounds.\n\n## \n\n- \nThe `Upsert` type was changed. Previously it had the columns (`index` ,`predicate` ) of what is now the`Index` type baked into its record. It now instead has a single`conflict` column (of type`Conflict` , which can be either an`Index` or a named constraint).\n- \nThe `DoNothing` constructor of`OnConflict` was changed to also take an optional`Conflict` value. Even though`ON CONFLICT DO NOTHING` does not generally require a`conflict_target` , there are cases where it can be necessary, e.g., if you have table that has both deferrable and non-deferrable constraints.\n- \n`rel8` now requires at least version`0.10.8.0` of`opaleye`\n\n## \n\n- \n`elem` and`elem1` now use`IS NOT DISTINCT FROM` semantics (matching`(==.)` ) when the element type is nullable, so`null` is found in an array containing`null` . Previously they were implemented with the array containment operator`<@` , which never matches`null` .\n- \nFixed some issues around the truncation of long column names.\n- \nImproved documentation.\n\n \n21 Likes\n\n \n[jackdk](https://discourse.haskell.org/u/jackdk)\n2\n \n`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.", "url": "https://wpnews.pro/news/rel8-1-8-released", "canonical_source": "https://discourse.haskell.org/t/rel8-1-8-released/14697#post_2", "published_at": "2026-09-22 00:34:18+00:00", "updated_at": "2026-09-22 00:54:16.620469+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["Rel8", "Haskell", "PostgreSQL", "Opaleye", "TemplateHaskell", "GHC-9.14", "TeofilC"], "alternates": {"html": "https://wpnews.pro/news/rel8-1-8-released", "markdown": "https://wpnews.pro/news/rel8-1-8-released.md", "text": "https://wpnews.pro/news/rel8-1-8-released.txt", "jsonld": "https://wpnews.pro/news/rel8-1-8-released.jsonld"}}