
26 Feb
2006
26 Feb
'06
11:40 a.m.
Neil Mitchell wrote:
Hi Pete,
a = (<) b x = (x <) c x y = (x < y)
I'm pretty sure this is the Monomorphism Restriction, its on the wiki at: http://www.haskell.org/hawiki/MonomorphismRestriction
You can use ghc -fno-monomorphism-restriction to compile the above or alternatively give a type signature for a ie a :: Ord p => p->p->Bool a = (<) Perhaps some later version of Haskell might get rid of this restriction by default (here's hoping! :-) ) Regards, Brian.