
I am pleased to announce the release of a new package, linear-generics[*], based on GHC.Generics and the venerable generic-deriving. The killer features: 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 assistance. [*] https://hackage.haskell.org/package/linear-generics
participants (1)
-
David Feuer