Proxy arguments in class methods: a comparative analysis
The Foreign.Storable
module provides a Storable
class with two rather unusual methods:
The Foreign.Storable
module provides a Storable
class with two rather unusual methods:
This is the third part in my series of practical applications of the
QuantifiedConstraints
extension. See also
part 1
and
part 2.
This is the second part in my series of practical applications of the
QuantifiedConstraints
extension. See
here
for part 1.
The Generic
and Generic1
classes are extremely useful tools in a GHC
programmer’s toolbox, but their utility is currently limited in the sense that
one can only derive Generic
instances for simple data types. By “simple”, I
mean that GHC will simply error if you try to derive Generic
a more
sophisticated data type—a GADT—like this one:
We’re drawing closer to a release of GHC 8.2, which will feature a variety of enhancements to GHC’s deriving
-related extensions. None of the improvements are particularly revolutionary, and for most code, you won’t notice a difference. But there are quite a few quality-of-life fixes that should make doing certain things with deriving
a little less of a hassle.