As we saw in #100 (preserving record names), our story for tracking Default instances isn't great and needs some manual skipping.
As I understand it, #100 introduces too many Default instances, and so we need to start keeping better track of which types have such instances. That way, we can check that some constructor can be fully applied to default arguments.
I haven't looked at the Default code, but we'll need to be careful to differentiate between three cases:
Default Int – type of kind Type which may or may not have Default instances.
Default (Maybe a) – type constructors which always have a Default instance.
Default a => Default (Pair a) – type constructors which have a Default instance when their arguments do.
This also doesn't address higher-order type constructors…
As we saw in #100 (preserving record names), our story for tracking
Default
instances isn't great and needs some manual skipping.As I understand it, #100 introduces too many
Default
instances, and so we need to start keeping better track of which types have such instances. That way, we can check that some constructor can be fully applied to default arguments.I haven't looked at the
Default
code, but we'll need to be careful to differentiate between three cases:Default Int
– type of kindType
which may or may not haveDefault
instances.Default (Maybe a)
– type constructors which always have aDefault
instance.Default a => Default (Pair a)
– type constructors which have aDefault
instance when their arguments do.This also doesn't address higher-order type constructors…