NO CODE WITHOUT DOCUMENTATION.
But that would rule out just about every current Haskell library :P. (Parsec being a wonderful counter-example)
*sigh*
I don't think that's entirely fair. Most of the libraries that come with GHC (and Hugs, and soon Nhc) are documented. See for example http://www.haskell.org/ghc/docs/latest/html/base/index.html Cheers, Simon
On Wed, 23 Apr 2003, Simon Marlow wrote: (snip)
I don't think that's entirely fair. Most of the libraries that come with GHC (and Hugs, and soon Nhc) are documented. See for example
Maybe I just always need awkward ones, but all I usually see here is a couple of general sentences for a module and a bunch of function names and type signatures. Even basic things like Data.List.nub, System.Random.split, etc. don't have any sort of explanation: you're left looking at real documentation, or experimenting with your guesses that were insprired by the type signature, to find out what the functions actually do. I am *not* complaining: I am very grateful for what GHC does offer and would love to have some time to help document stuff. But how the stuff at http://www.haskell.org/ghc/docs/latest/html/base/index.html can be thought of as being reasonable documentation, I've no idea! (-: -- Mark
On Wed, 23 Apr 2003, Simon Marlow wrote: (snip)
I don't think that's entirely fair. Most of the libraries that come with GHC (and Hugs, and soon Nhc) are documented. See for example
Maybe I just always need awkward ones, but all I usually see here is a couple of general sentences for a module and a bunch of function names and type signatures.
Function names and type signatures are a lot better than nothing ;-) But seriously, the "non-standard" libraries are, at the moment, far better documented than the standard ones (where "standard" means those libraries defined by the Haskell 98 report and their hierarchical equivalents). The example you gave, Data.List.nub, is a function from the standard Haskell 98 List library. Contributions of documentation for any libraries are always welcome, of course! Cheers, Simon
Simon Marlow wrote: | But seriously, the "non-standard" libraries are, at | the moment, far better documented than the standard | ones (where "standard" means those libraries defined | by the Haskell 98 report and their hierarchical | equivalents). The example you gave, Data.List.nub, is | a function from the standard Haskell 98 List library. I have a suggestion: can the "documentation" for these libraries contain a link to the place where they are defined in the Haskell report? /Koen
On Wed, 23 Apr 2003 17:00:55 +0200 (MET DST) Koen Claessen <koen@cs.chalmers.se> wrote:
Simon Marlow wrote:
| But seriously, the "non-standard" libraries are, at | the moment, far better documented than the standard | ones (where "standard" means those libraries defined | by the Haskell 98 report and their hierarchical | equivalents). The example you gave, Data.List.nub, is | a function from the standard Haskell 98 List library.
I have a suggestion: can the "documentation" for these libraries contain a link to the place where they are defined in the Haskell report?
/Koen
This slightly relates to Johannes Waldmann's reply (the reference is indexed by type too); there's a fairly good start to a reference of the standard Haskell 98 prelude at http://zvon.org/other/haskell/Outputglobal/index.html .
.. and a bunch of function names and type signatures..
( This is slightly unrelated, but anyway: ) you only get the above if you have the module source, or if you can decipher the interface file. A friend told me recently that some interactive Prolog (?) systems have a this nice feature: the user can ask for all identifiers (currently in scope) of a certain type (or mode? or was it LISP anyway?) (so [a] -> [a] should give you reverse and tail). Perhaps one would want to use "type wildcards" as well, or some other form of saying "tell me what functions *mention* that type". Looks like this would be even more useful with a stronly typed language. -- -- Johannes Waldmann ---- http://www.informatik.uni-leipzig.de/~joe/ -- -- joe@informatik.uni-leipzig.de -- phone/fax (+49) 341 9732 204/207 --
Johannes Waldmann <joe@informatik.uni-leipzig.de> writes:
A friend told me recently that some interactive Prolog (?) systems have a this nice feature: the user can ask for all identifiers (currently in scope) of a certain type (or mode? or was it LISP anyway?) (so [a] -> [a] should give you reverse and tail).
See: Retrieving Reusable Software Components by Polymorphic Type, C. Runciman, I. Toyn, Journal of Functional Programming, 1(2), April 1991, pp191-211. This was available in lazy FP systems before Haskell even appeared. I wonder why no-one has ever implemented the idea for Haskell? It seems like it would be useful. Regards, Malcolm
participants (6)
-
Derek Elkins -
Johannes Waldmann -
Koen Claessen -
Malcolm Wallace -
Mark Carroll -
Simon Marlow