Changelog for generic-data-0.9.2.0
0.9.2.0
- Add instance of
BoundedforFiniteEnumeration(the same asGenerically)
0.9.1.0
- Fix
conIdToString(it was completely broken) - Add
conIdMinandconIdMaxrepresenting the leftmost and rightmost constructors of a data type. - Add
NonEmptyTypeandIsEmptyTypeto express the constraint that a generic type must or must not be empty. - Reexport
GenericandGeneric1for convenience.
0.9.0.0
-
Improved definition of
gfoldMap,gtraverse, andsequenceA. The optimized Core ofTraversableinstances eliminates allGHC.Genericinstance boilerplate. In many cases, it is identical to the result of GHC'sDeriveFoldableandDeriveTraversableextensions (note: this was already not a problem forgfmap).It's worth noting that there are currently issues with inlining which prevent optimizations that generic-data would ideally rely on.
-
The biggest issue is that GHC will not even inline the
toandfrommethods of theGenericinstance it derives for large types (this shows up at around 5 constructors and 10 fields, which is indeed not really big). This will be fixed by a patch for GHC (WIP): https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2965 -
There appear to be some more inlining issues beyond that (issue #40).
-
0.8.3.0
- Add generic
Read. Thanks to RyanGlScott.
0.8.2.0
- Add microsurgery
CopyRep. - Improve documentation of
Microsurgerymodule. - Fix a bug where
gshowsPrecwould incorrectly display prefix uses of symbol data constructors or record selectors (e.g.,data R = (:!:) Int Intordata S = MkS { (##) :: Int -> Int }). Thanks to RyanGlScott. - Fix a bug where
gshowsPrecwould incorrectly display infix uses of alphanumeric data constructors (e.g.,data T = Int `MkT` Int). Thanks to RyanGlScott.
0.8.1.0
- Add
Oldtype family mapping newtypes to their underlying type.
0.8.0.0
-
Add
GenericProduct, for derivingvia GenericProduct BwhenBis not the typeAyou want the derived instance for. Note this used to beGenerically's behavior forMonoidbefore 0.7.0.0. -
Add generic implementations for
Ix. Thanks to Topsii. -
Add
conIdNamed, to get aConIdby its type-level name -
Add instance
Show (ConId a) -
Improve type errors for deriving
SemigroupandMonoidviaGenerically. Thanks to yairchu.
0.7.0.0
- Change
Monoidinstance forGenerically, to be compatible with users' non-generic instances ofSemigroup. Thanks to yairchu. - Add
gcoerce,gcoerceBinop.
0.6.0.1
- Fix derivation of
Show1for(:.:)
0.6.0.0
- Add
Surgerynewtype for DerivingVia Derecordify,Typeage,RenameFields,RenameConstrs,OnFieldsare no longer type families, but defunctionalized symbols to be applied usingGSurgery.
0.5.0.0
- Specialize
onDatatoData - Add some instances for
U1andV1inMicrosurgery - Add
OnFieldsandDOnFieldssurgeries ("higher-kindification")
0.4.0.0
-
Created
Microsurgerymodule. Initial set of surgeries:DerecordifyTypeageRenameFields,RenameConstrs- Some doc about using generic-lens for surgeries
0.3.0.0
- Add generic implementations of
enumFrom,enumFromThen,enumFromTo,enumFromThenTo. They are actually required to be explicit for correctEnuminstances. Thanks to Topsii. - Parameterize
GEnumby a type-level option, and addFiniteEnumoption to allowEnumto be derived for composite types. Thanks to Topsii.
0.2.0.0
- Remove
Generic.Data.Types.Map - Add
Generic.Data.Data.Types.toDataandfromData - Remove
Defunmodule (subsumed byfirst-class-familiespackage)
0.1.1.0
- Add
gconIndex - Interface for constructor tags
- Type-level
Metaaccessors - Add basic
Newtypefunctions
0.1.0.0
Released generic-data