In the Scrap Your Boilerplate package, in Data.Generics.Aliases
, there are functions to allow type extension for unary, and binary type constructors. In particular, there are definitions for ext1
and ext2
.
Now, ext1
and ext2
are defined in terms of dataCast1
, and dataCast2
, which are part of the Data
type class, and are usually defined by the DeriveDataTypeable
machinery. But, there's no dataCast3
, so I don't see an easy way to define ext3
.
Is it possible to define ext3
, and if so, how?
I'm pretty sure this isn't sufficient. But it feels darn close.