Open paf31 opened 9 years ago
I have a hunch we can derive those without a new class.
In particular, introduce a "fresh type" Placeholder that instantiates generic and is essentially a newtype for unit.
Now you can examine the Spine of Foo Placeholder
and see the "shape of Foo with an arbitary placeholder" and work from there...?
Ah, neat idea.
Not sure how simple this. Maybe something like
where
GenericSignature1
adds a constructor for the type argument somehow.With a view to deriving
Functor
,Foldable
,Traversable
, etc.