Sat, 6 May 2000 13:07:03 +0200 (MET DST), Bart Demoen <[EMAIL PROTECTED]>
pisze:
> I am quite happy with not getting a compile-time error for
> non-implemented class methods, as long as I get a compile-time error
> when I try to use a non-implemented class method.
This is impossible.
> I mean
>
> > class Foo t where
> > g :: t -> Int
> >
> > data Blob = One | Two
> >
> > instance Foo Blob where ;
>
> looks ok without error; but adding
>
> > y = g One
>
> should result in an error I think.
What about:
mg:: Foo t => [t] -> [Int]
mg = map g
y = mg [One]
Where could the error be reported? Both mg and y definitions themselves
are OK. It is not expressed in mg's type which Foo's methods it uses.
--
__("< Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
\__/ GCS/M d- s+:-- a23 C+++$ UL++>++++$ P+++ L++>++++$ E-
^^ W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP+ t
QRCZAK 5? X- R tv-- b+>++ DI D- G+ e>++++ h! r--%>++ y-