[Haskell-cafe] Illegal type def

PR Stanley prstanley at ntlworld.com
Sat Dec 1 21:43:39 EST 2007


Hi
 > type assoc k v = [(k, v)]

works beautifully and everything makes sense.

 > type Assoc v = (Ord k) => [(k, v)]

This doesn't work. Is there any wayof defining k as an element of 
type Ordinal. I could redefine k by putting Char or Int in its place. 
Why can't I be more general?
Thanks,
Paul



More information about the Haskell-Cafe mailing list