Tue, 2 May 2000 10:14:40 +0200, Jan Brosius <[EMAIL PROTECTED]> pisze:

> Suppose in some function definition some variable is of type  A s a and I
> want to do something like this : if the type variable of the first parameter
> in  A s a
> is   s  then do this if not then do something else.

This is what classes are for, even if not exactly in the way you mean.

This is a complex subject: they are powerful, but many things that
seem to be almost possible cannot be done with them, and there are
many extensions to Haskell related to classes.

Remember that there is no "else". Everything must be positive.
And it must fit into the statically typed world.

Tell us what the specific problem is. Maybe some completely different
approach would be reasonable for it.

-- 
 __("<    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-


Reply via email to