Class System current status

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Fri May 12 08:18:29 EDT 2006


>>   - We're already in that state. There *is* a lot of Haskell code that
>> uses FDs, it's just not Haskell 98 code. Whenever ATs take over, we'll
>> still have to deal with this code.
> 
> are you sure about *lots* ?  i seen only 3-4 ones (monad transformers,
> collections, may be arrays, my streams) and think that all these
> libraries can be redesigned without any problems once in several
> years. 

OK, here's an example where I use functional dependencies:
http://141.57.11.163/cgi-bin/cvsweb/tool/src/Challenger/Partial.hs?rev=1.23

class ( Show p, ToDoc i, Reader b, ToDoc b, Measure p i b )
    => Partial p i b | p i -> b  where ...       -- (*)

containing two methods that don't use all type variables.
(That's why I think I need the FD.)
How would this look without FD? With ATs?
Is there an altogether better design for this?
Where I still would not need to change the client code?

(*) A funny visual aspect of FDs is the absurd syntax.
On the left of "|", the whitespace is (type arg) application,
but on the right, it suddenly denotes sequencing (tupling)

Best regards,
-- 
-- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 --
---- http://www.imn.htwk-leipzig.de/~waldmann/ -------



More information about the Haskell-prime mailing list