Hi Luis,

Luis Cabellos wrote:
But if I change the order of *Show* and *Num* in the signature of /prettyShow/ it works.

It's a GHC problem? it's normal than signature is order-dependent?

I think this is on purpose. The error specifically says that the contexts must be identical (rather than containing the same classes in arbitrary). I suspect this is how Haskell98 has specified it.

If you enable the RelaxedPolyRec language extension, this restriction no longer applies and your code compiles fine.

Hope this helps,

Martijn.

_______________________________________________
Haskell mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to