Vag Vagoff wrote:

>It is very convenient to use
>
>    class (+) infixl 6 a :: !*a !a -> .a
>

Unfortunately if the compiler would permit this type and if 'a' cannot be
coerced the following functions would be rejected by the typechecker:

f a b = a+(b+a) // because a cannot have type *a and a

g a b c
        # x = a+b
        | True
                = x+c
                = c+x
        // x cannot have type *a and a in different alternatives

Kind regards,

John van Groningen
_______________________________________________
clean-list mailing list
[email protected]
http://mailman.science.ru.nl/mailman/listinfo/clean-list

Reply via email to