Open LukaHorvat opened 6 years ago
Thanks! I think the Show a
instance I added is proving actively harmful - it works well in the same module, but is of no use in a different module, where it must live in the Debug library. Or I could inject a Show, but then you probably get other nasty problems.
Perhaps however _ =>
is enough to have GHC infer whatever Show instances it needs? Will try that tonight - Show (m Int)
would be ideal.
I went with _ =>
and it's vastly simpler - great news!
I had to comment out the type2
example, so that still needs work.
Got another one for you.
Try this:
You get an
Overlapping instances for Show (m0 Int)
error. This can be "fixed" by adding ainstance {-# INCOHERENT #-} Show (m Int)
somewhere because the arcane rules of instance selection pick this one.I'm not really sure what you can really do about this.