[Haskell-cafe] Illegal type def
Philip Weaver
philip.weaver at gmail.com
Sat Dec 1 22:03:39 EST 2007
Should work with glasgow extensions (-fglasgow-exts).
- Phil
On Dec 1, 2007 6:43 PM, PR Stanley <prstanley at ntlworld.com> wrote:
> 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
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20071201/55aa72eb/attachment.htm
More information about the Haskell-Cafe
mailing list