@hackage data-diverse0.11.0.0
Extensible records and polymorphic variants.
Deprecated
Tested Compilers
Dependencies (5)
Dependents (6)
@hackage/data-diverse-lens, @hackage/glazier, @hackage/glazier-react, @hackage/acme-everything, @hackage/parameterized, @hackage/glazier-react-widget
"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.
-
0.9.0.0
- Breaking changes: Renamed Many.sliceL/R to Many.viewf/b
- Renamed TypeLevel.Internal.MissingImpl to IsUniqueImpl.
- Added postifx' with SnocUnique and append' with AppendUnique.
- Added Semigroup & Monoid instances for
Many '[]andWhich '[] - Fixed GHC 8.2 compile error with importing GHC.Prim (Any)
-
0.9.0.1
- Fixed GHC 8.2.1 test failure due to changed TypeRep show instance.
-
0.10.0.0
- Renamed
SwitchtoSwitcher. Switch is now a type synonym forswitchconstraints - Added CasesResult type family to help infer the result of
cases - Added Semigroup and Monoid instances for all Many xs.
- Added Maybe versions of trial, and reinterpret
- Renamed
reinterpetNtoreinterpretN' - Renamed
impossibletozilch. - Allowed
reintepreting anddiversifyingzilchtozilch - Removed zipped type variable from
Amendconstraints. - Removed r type variable from
Reducetypeclass. - Rearranged type variables in
fetch,replace,pick,trial,Diversifytype parameters, so the type variable ordering is consistently smaller to larger, ie. 'x', 'xs', 'branch', 'tree' - Added
diversify'for allowing rearranging the types only.
- Renamed
-
0.11.0.0
- Fixed https://github.com/louispan/data-diverse/issues/4
- Added
impossiblemodelled afterData.Void.absurd - Removed
zilchsoWhich '[]is uninhabited likeData.Void.Void, making 'impossible' safe to use. - Removed
Monoidand changedShow,ReadandGenericinstances forWhich '[]to be partial just like Data.Void.Void. - Added instance Reduce (Which '[]) (Switcher c '[] r), which follows from 'impossible'.
