One comment and one questions re the recent discussion about Haskell libraries 
and documentation:

First, if the "BlueSkyMode/Perfect Haskell Prelude" ever does come to pass,
I imagine it'll be pretty daunting for beginners (crammed full of 
constructor classes, arrows, polytypism, points-free definitions, etc.). 
It would be nice to have a standard "beginner's prelude" for teaching (or
learning) purposes, so that newbies can ease into the more difficult concepts
bit by bit. Learning how to write good, generalized code is a process in
itself, and seeing a bunch of "most general possible" versions of various
ideas is not necessarily the best way to develop insight. (Actually, seeing
the generalization process repeatedly is a good way to raise students'
conciousness of it, so that they begin to anticipate it and incorporate it
into their own thinking.)

I know people have bandied this idea (beginner's prelude) about before.
To cast it in terms raised by someone a while back (sorry, lost the reference), 
it would be nice if beginners could write something like:

        average xs = sum xs / length xs

without a lecture on the numeric class hierarchy.

Second, regarding more serious/industrial use of libraries, does anyone have
a tool that looks up functions in libraries based on a type provided by the
user, up to reasonable isomorphism/type generalizations? I know there has
been some work on this in the types community over the years, but I'm not
aware of a tool implemented for Haskell code.

(caveat emptor: one still has to read the documentation carefully after the 
tool returns both unzip and unzap on input "[(a,b)] -> ([a],[b])"  ;) )

  --  Fritz Ruehr


Reply via email to