[Haskell-cafe] [ANN] linear-generics

David Feuer 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

[*] https://hackage.haskell.org/package/linear-generics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20211012/000c8453/attachment.html>

More information about the Haskell-Cafe mailing list