union

Extensible type-safe unions

Version on this page:0.1.1.2@rev:1
LTS Haskell 23.22:0.1.2@rev:9
Stackage Nightly 2025-05-17:0.1.3
Latest on Hackage:0.1.3

See all snapshots union appears in

BSD-3-Clause licensed by Vladislav Zavialov
Maintained by Vladislav Zavialov
This version can be pinned in stack with:union-0.1.1.2@sha256:9c0127a79f8aa65bb98b7f4e4050d40f3cbe92d2665ef76652fc1f7ed770c69e,2084

Module documentation for 0.1.1.2

  • Data
    • Data.Union

Extensible type-safe unions for Haskell with prisms using modern GHC features. Dual to vinyl records. Unions are also known as corecords or polymorphic variants. Neither requires a Typeable constraint nor uses unsafe coercions at the cost of linear time access (negligible in practice).