Type Classes and the StdEnv

Bjorn Lisper lisper@it.kth.se
Wed, 26 Nov 1997 09:00:53 +0100 (MET)


Nick Kallen:
>Why isn't there is a map class? Sometimes you want to map a tree, or--to use
>the Parser Combinators document as an example--an environment. Why must one
>define a maptree function, a mapenvironment function, etc.? Wouldn't it be
>nice for there to be a map class? I figure that this idea of expanding the
>classes in the StdEnv applies to more than just map. Should StdEnv be
>expanded like that?

There's some work in the Haskell community towards this goal. The polytypic
programming paradigm by Jansson and Jeuring at Chalmers gives you this. I
think they had a paper in last POPL. See also Mark Jones' work on
constructor classes a couple of years ago.

Björn Lisper