On Tue, 8 May 2018 at 12:20 AM, Clinton Mead <redirect@vodafone.co.nz> wrote:Firstly, you refer to https://wiki.haskell.org/GHC/AdvancedOverlap . Unfortunately (unless I've missed something) these involve listing all the instances of parent classes. I'm trying to avoid that. Indeed if I have to explicitly list all the instances I might as well write them the normal way so I'm not sure what the point of any trickery is.Yes that approach does need declaring instances of `ShowPred` (or in general `XXXPred`), which doubles-up the instances for `Show` (or `XXX`). That approach is making a closed world: for every type `t`, return either `True` or `False` that it has an instance for `Show`.I'm not sure what you mean by "write them the normal way"? Just declaring `t` an instance of `Show` doesn't expose that in any way you can run type-level functions over it.
I'm puzzled what it is you're trying to do.