Is there a printable copy of the (GHC) library references anywhere?
I'd like to print out a copy of the GHC manuals, for reference. I've got the Haskell 98 report, and the GHC user guide, but the only documentation I've found for the hierarchical libraries is in HTML format (generated from Haddock). Is there a printable (preferably PDF) form of the library documentation? Either all of it, or alternatively reasonably large subsets? Thanks, Paul.
On 12/27/06, Paul Moore <p.f.moore@gmail.com> wrote:
I'd like to print out a copy of the GHC manuals, for reference. I've got the Haskell 98 report, and the GHC user guide, but the only documentation I've found for the hierarchical libraries is in HTML format (generated from Haddock).
Is there a printable (preferably PDF) form of the library documentation? Either all of it, or alternatively reasonably large subsets?
There may be an easier way, but if nothing else, you could download the HTML.tar.gz file for the library docs and then use latex2html to generate TeX to generate a PDF. (Personally I wouldn't find it at all useful to have a printed copy of the library docs, even though I do like printed manuals, because I only ever consult them to look up a specific function or type, which is a lot easier to do in the hypertext version -- but YMMV.) Cheers, Kirsten -- Kirsten Chevalier* chevalier@alum.wellesley.edu *Often in error, never in doubt "All we can ever do is lay a word in the hands of those who have put one in ours." -- Richard Powers
On 12/27/06, Kirsten Chevalier <catamorphism@gmail.com> wrote:
(Personally I wouldn't find it at all useful to have a printed copy of the library docs, even though I do like printed manuals, because I only ever consult them to look up a specific function or type, which is a lot easier to do in the hypertext version -- but YMMV.)
You're right - if I think about it, I'm not really looking for "the documentation", but more a paper or article which is "a tour of the GHC standard library". That's something that would be really useful from a beginner's POV - and would be more useful than the reference documentation in printed form. There seems to be a lot in the standard library, but very little in the way of pointers on how much there is (if that makes sense...) Anyway, thanks for getting me to clarify my thoughts - I'll see what I can find, and maybe write up anything I discover. Paul.
Hi Paul,
You're right - if I think about it, I'm not really looking for "the documentation", but more a paper or article which is "a tour of the GHC standard library".
A tour of the Prelude: http://undergraduate.csse.uwa.edu.au/units/230.301/lectureNotes/tourofprelud... Only a few of the standard libraries are useful unless you are doing something specific. i.e. Data.Maybe is generally useful, but Control.Monad.State is only useful if you are using a state monad. If someone wrote a tour of Data.List/Data.Maybe as well as a few common functions out of Control.Monad that would probably make a nice companion to a tour of the prelude. Thanks Neil
On 27/12/06, Neil Mitchell <ndmitchell@gmail.com> wrote:
If someone wrote a tour of Data.List/Data.Maybe as well as a few common functions out of Control.Monad that would probably make a nice companion to a tour of the prelude.
Maybe: http://en.wikibooks.org/wiki/Haskell/Hierarchical_libraries/Maybe Lists: http://en.wikibooks.org/wiki/Haskell/List_processing (written from a complete beginners POV, perhaps we need a more summary-like article that involves Cale's fold diagrams). For anything more complex (Maps, Arrays), it becomes impractical to write a 'tour of the library' without duplicating the Haddock docs. However, an introduction to Control.Monad à la the 'Monad implementation' section in All About Monads would make a nice chapter in the wikibook. -- -David House, dmhouse@gmail.com
On 12/27/06, Neil Mitchell <ndmitchell@gmail.com> wrote:
Only a few of the standard libraries are useful unless you are doing something specific. i.e. Data.Maybe is generally useful, but Control.Monad.State is only useful if you are using a state monad.
Hmm, I'm not sure I agree with you here. Yes, a lot of the libraries are fairly specialised, but the problem is when you find you need a specialised library, how do you know it exists in the standard library? That's where something like the Haddock documentation is less useful, as it's library-oriented rather than task-oriented. For example (not a wonderful example, as I know the answer :-)) if I'm writing a program and I need to build a parser, what's to tell me (apart from asking around, or stumbling on it) that Parsec is the library I want - or if I know that, that it's included in the standard library and I don't need to go and install it? (Other broad areas occasionally relevant to me - XML serialisation, sending emails, SSH, implementing a Windows service...). I'm not so much asking "can I do X?" as "how do I reach a level where I stand a chance of knowing the answer to "can I do X?" without asking?" :-) Ultimately, though, I agree that the basic answer is just experience...
If someone wrote a tour of Data.List/Data.Maybe as well as a few common functions out of Control.Monad that would probably make a nice companion to a tour of the prelude.
David House pointed me at Wikibooks entries for these two, which look quite nice. Cheers, Paul.
For example (not a wonderful example, as I know the answer :-)) if I'm writing a program and I need to build a parser, what's to tell me (apart from asking around, or stumbling on it) that Parsec is the library I want - or if I know that, that it's included in the standard library and I don't need to go and install it?
Thus you need a list of availible libraries to get to know wether they will fit your needs... The only "index" I know of is www.haskell.org -> link Applications and libraries ... Another way would be goto darcs.haskell.org and browse the folders. Many libs are located there (of course not all) Another "list of libraries" can be found in gentoo portage overlay http://haskell.org/~gentoo/gentoo-haskell Some standard packages can be found in one source file eg Some additional libraries can be found here http://www.haskell.org/ghc/dist/current/dist/ -> *extra-libs* If this and google didn't help you I would ask ;) Marc Weber
Hello Marc, Thursday, December 28, 2006, 6:25:46 PM, you wrote:
The only "index" I know of is www.haskell.org -> link Applications and libraries ...
you forget about HCAR
Another way would be goto darcs.haskell.org and browse the folders. Many libs are located there (of course not all)
main libraries - yes, but no more than 10% of overall count -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com
About the usefulness of libraries: I just made some statistics on imports in Haskell code; I have a lot of Haskell source code on my disk (mostly downloaded). In the following table, the number on the left indicates the number of imports found for each library. Top twenty of imports: 418 Data.List 417 System.IO 288 Data.Char 274 Control.Monad 157 Data.Maybe 150 Graphics.UI.WX 144 Control.Exception 118 Test.HUnit 105 System.Directory 103 Data.Word 101 Prelude 95 Text.ParserCombinators.Parsec 84 System.IO.Error 83 System.IO.Unsafe 80 System.Exit 79 Data.Array 76 Graphics.UI.WXCore 75 Data.Bits 73 System.Time 73 MissingH.Str Total number of imports: 8691 Total number of files: 1918 Regards, Henk-Jan van Tuyl On Wed, 27 Dec 2006 22:00:24 +0100, Neil Mitchell <ndmitchell@gmail.com> wrote:
Only a few of the standard libraries are useful unless you are doing something specific. i.e. Data.Maybe is generally useful, but Control.Monad.State is only useful if you are using a state monad.
If someone wrote a tour of Data.List/Data.Maybe as well as a few common functions out of Control.Monad that would probably make a nice companion to a tour of the prelude.
Thanks
-- Met vriendelijke groet, Henk-Jan van Tuyl -- http://Van.Tuyl.eu/ -- Using Opera's revolutionary e-mail client: https://secure.bmtmicro.com/opera/buy-opera.html?AID=789433
On 28/12/06, Henk-Jan van Tuyl <hjgtuyl@chello.nl> wrote:
In the following table, the number on the left indicates the number of imports found for each library.
Care to share your script you used to produce these numbers? -- -David House, dmhouse@gmail.com
Here are the scripts; they are written in Rexx, because I have bad experience with reading through a lot of files, with Haskell (memory leaks). You can download the Rexx interpreter Regina from SourceForge to run the scripts. If you rewrite them in Haskell, I would like to see the result. Regards, Henk-Jan On Thu, 28 Dec 2006 23:08:38 +0100, David House <dmhouse@gmail.com> wrote:
On 28/12/06, Henk-Jan van Tuyl <hjgtuyl@chello.nl> wrote:
In the following table, the number on the left indicates the number of imports found for each library.
Care to share your script you used to produce these numbers?
-- Met vriendelijke groet, Henk-Jan van Tuyl -- http://Van.Tuyl.eu/ -- Using Opera's revolutionary e-mail client: https://secure.bmtmicro.com/opera/buy-opera.html?AID=789433
I pushed the Send button too fast, you need the attached script as well. On Thu, 28 Dec 2006 23:08:38 +0100, David House <dmhouse@gmail.com> wrote:
On 28/12/06, Henk-Jan van Tuyl <hjgtuyl@chello.nl> wrote:
In the following table, the number on the left indicates the number of imports found for each library.
Care to share your script you used to produce these numbers?
-- Met vriendelijke groet, Henk-Jan van Tuyl -- http://Van.Tuyl.eu/ -- Using Opera's revolutionary e-mail client: https://secure.bmtmicro.com/opera/buy-opera.html?AID=789433
I wrote "A tour of the Haskell monad functions" last year, see http://members.chello.nl/hjgtuyl/tourdemonad.html Regards, Henk-Jan van Tuyl On Wed, 27 Dec 2006 22:00:24 +0100, Neil Mitchell <ndmitchell@gmail.com> wrote:
If someone wrote a tour of Data.List/Data.Maybe as well as a few common functions out of Control.Monad that would probably make a nice companion to a tour of the prelude.
-- http://Van.Tuyl.eu/ -- Using Opera's revolutionary e-mail client: https://secure.bmtmicro.com/opera/buy-opera.html?AID=789433
Hello Paul, Wednesday, December 27, 2006, 11:53:33 PM, you wrote:
You're right - if I think about it, I'm not really looking for "the documentation", but more a paper or article which is "a tour of the GHC standard library". That's something that would be really useful
i just read library sources :) in addition to information about features implemented, it allows to learn good programming style used here -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com
participants (7)
-
Bulat Ziganshin -
David House -
Henk-Jan van Tuyl -
Kirsten Chevalier -
Marc Weber -
Neil Mitchell -
Paul Moore