data-diverse

Extensible records and polymorphic variants.

https://github.com/louispan/data-diverse#readme

Version on this page:0.8.1.0
LTS Haskell 22.14:4.7.1.0
Stackage Nightly 2024-03-28:4.7.1.0
Latest on Hackage:4.7.1.0

See all snapshots data-diverse appears in

BSD-3-Clause licensed by Louis Pan
Maintained by [email protected]
This version can be pinned in stack with:data-diverse-0.8.1.0@sha256:d2ffb4e5b2efdea949b257c2604db555294d82a3ab1316a703dca04a6e078a16,3181
Used by 1 package in nightly-2017-07-25(full list with versions):

Hackage Build Status

“Data.Diverse.Many” is an extensible record for any size encoded efficiently as (Seq Any).

“Data.Diverse.Which” polymorphic variant of possibilities encoded as (Int, Any).

Provides getters, setters, projection, injection, folds, and catamorphisms; accessed by type or index or label.

Refer to ManySpec.hs and WhichSpec.hs for example usages.

Iso, Lens and Prisms are provided in data-diverse-lens

Changelog

  • 0.1.0.0 Initial version represented as (Int, Data.Map Int Any)

  • 0.4.0.0 Removed Emit typeclass, breaking renames. Added label accessors.

  • 0.5.0.0 Renamed type level functions module from Type to TypeLevel

  • 0.6.0.0 Moved lens to data-diverse-lens

  • 0.7.0.0 Removed NOINLINE pragmas. Changed internal representation to (Int, Data.IntMap Any) for a 2.5x append speedup.

  • 0.8.0.0 Changed internal representation to (Data.Seq Any) for a further 2x append speedup. Added NFData instance for Many

  • 0.8.1.0 Added NFData instance for Which Forgot to expose Many.sliceL and Many.sliceR