Re: Polymorphic recursive calls possible via type classes

1993-07-27 Thread jones-mark
Konstantin Laufer <[EMAIL PROTECTED]> writes: | Consider the following recursive function binding: | | > f [] = 0::Int | > f (x:xs) = 1 + f([]::[Int]) + f([]::[Bool]) + f xs | | This binding is ill-typed since f is used in two different instances | of its polymorphic-to-be type.

Polymorphic recursive calls possible via type classes

1993-07-27 Thread Konstantin Laufer
Consider the following recursive function binding: > f [] = 0::Int > f (x:xs) = 1 + f([]::[Int]) + f([]::[Bool]) + f xs This binding is ill-typed since f is used in two different instances of its polymorphic-to-be type. Indeed, the above declaration is rejected by hbc, ghc, and g