The dreaded M-R

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Fri Jan 27 05:50:05 EST 2006


John Hughes wrote:

> Actually, I find the need to specify type signatures to get overloading
> awkward already [...]
> I don't like needing to maintain such type signatures when I change code
> elsewhere. [...]
> However, this is reasonably a separate problem, [...]

indeed. I use "constraint collection classes" (without methods) as in:
http://141.57.11.163/cgi-bin/cvsweb/lib/Autolib/NFA/Data.hs.drift?rev=1.15
look for class NFAC (it collects the constraints for using type NFA).
This allows to write short contexts at the call sites,
and make local changes at the definition side.

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