haskell  

Re: [Haskell] Signature error because the order

Martijn van Steenbergen
Thu, 14 Jan 2010 04:24:35 -0800

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
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell