Dave Tweed wrote:

> For me what would make an STL-like library useful would be having
> collections of algorithms available which operate on any `bulk type' for
> which they make sense, but I suspect that to be suitably efficient
> handwritten versions would be needed for each type. (Folding over sets vs
> folding over lists vs folding over bags ..., etc). It might also make the
> error messages for some prelude functions, e.g., map, more slightly
> more vague:

You don't need handwritten versions for folding, mapping etc. as these
functions happen to be *unique* and they are quite easy to generate
(which I do) within the compiler, by looking at the type declaration.

What is problematic is to let the user (and the compiler) know that
these things exist. If I figure out how to convince the renamer pass
of GHC not to complain about the absence of functions which I generate
later, I'd be happy to give you a copy. (It's 3.02, I'm afraid)

Laszlo Nemeth
[EMAIL PROTECTED]



Reply via email to