I've been trying to get to the point with Haskell where I can write

useful programs, and I've come across something I don't understand with

the type system. I hope this is the right place to ask.

I came up with the following list of declarations:

a = (<)

b x = (x <)

c x y = (x < y)

It turns out that 'a' is badly typed and gives an error at compile time.

'B' and 'c' are equivalent and have type "Ord a => a -> a -> Bool".

What I don't understand is why 'a' doesn't behave the same way as the

other two.

Thanks for any help you can give me, and in the meantime I'll go back to

relearning everything I thought I knew about programming. :-)

Pete

_______________________________________________

Haskell-Cafe mailing list

[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe