[Haskell-cafe] [ANN] linear-generics
david.feuer at gmail.com
Tue Oct 12 06:02:37 UTC 2021
I am pleased to announce the release of a new package, linear-generics[*],
based on GHC.Generics and the venerable generic-deriving. The killer
1. Generic1 representations associate compositions the right way around,
which is to say the *left* way around, meaning no more inefficient fmaps or
pesky Functor constraints.
2. to, from, to1, and from1 are multiplicity polymorphic, so you can use
them in all your fancy new linearly typed code.
The package includes Template Haskell-based deriving, based closely on
generic-deriving, which is the recommended way to write instances. There is
also a limited, somewhat unsafe, and somewhat inefficient way using
provided DerivingVia targets.
Many thanks to Arnaud Spiwack and Ryan Scott for valuable advice and
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe