
Where can I find the haskell sources of the standard library? I searched for all files ending in .hs in my haskell folder and found none.

Sorry for the stupid question... I downloaded them... On Mon, Mar 8, 2010 at 11:07 AM, Nicolas Couture-Grenier < greniernic@gmail.com> wrote:
Where can I find the haskell sources of the standard library?
I searched for all files ending in .hs in my haskell folder and found none.

You can also find them online, the easiest way is using Hoogle. Say you wanted to see the source code for the 'sort' function. Go to haskell.org/hoogle and search for 'sort'; the second result (Data.List.sort) is what we want. Clicking on it takes us to the documentation for sort. Then at the right margin there is a 'Source' link; clicking that lets us see the definition of sort (and the rest of Data.List). -Brent On Mon, Mar 08, 2010 at 11:11:10AM -0500, Nicolas Couture-Grenier wrote:
Sorry for the stupid question...
I downloaded them...
On Mon, Mar 8, 2010 at 11:07 AM, Nicolas Couture-Grenier < greniernic@gmail.com> wrote:
Where can I find the haskell sources of the standard library?
I searched for all files ending in .hs in my haskell folder and found none.
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

Am Montag 08 März 2010 17:07:31 schrieb Nicolas Couture-Grenier:
Where can I find the haskell sources of the standard library?
I searched for all files ending in .hs in my haskell folder and found none.
If you don't build GHC from source (or download the source tarball just for the sake of it), you don't have the sources installed, however, there should be source-links in the library documentation (I think that comes with the binaries). Otherwise, go to http://www.haskell.org/ghc/docs/6.12.1/html/libraries/index.html and then e.g. to http://www.haskell.org/ghc/docs/6.12.1/html/libraries/base-4.2.0.0/Data- List.html There is a Source code link at the top, and at the documentation of each function, there's a link to the code of that particular function, e.g. http://www.haskell.org/ghc/docs/6.12.1/html/libraries/base-4.2.0.0/src/Data- List.html#permutations

On Mar 8, 2010, at 8:07 AM, Nicolas Couture-Grenier wrote:
Where can I find the haskell sources of the standard library?
As others have said, it depends how you install GHC. This is a bit of a sore point with Haskell, masked by the fact that many people use online sources. I like to code on airline flights and places I don't have wifi, so local HTML versions of source for all libraries is essential. Even building from source, cabal install doesn't produce every possible conceivable source file in HTML format. There are proposed fixes but they haven't been adopted. I resort to a script that manually rips out all CABAL documentation then rebuilds it from scratch, every time I add a library. If I had more time I'd tweak this script to be more clever, but it works, and I'm busy. There are some dated assumptions behind all this; some of us are old enough to remember days when hard disk capacities were a serious resource constraint. That is no longer true. It is inconceivable to me that today, anyone serious about Haskell cares about its modest disk footprint. But hey, old habits die hard. Why can't we agree as a community that no matter how one obtains GHC, on any platform by any delivery means, the default should be to provide absolutely every single line of source code as linked HTML? I mean, we're a serious language, and isn't such a principle part of the definition of being a serious language?

On 8 March 2010 17:27, Dave Bayer
Why can't we agree as a community that no matter how one obtains GHC, on any platform by any delivery means, the default should be to provide absolutely every single line of source code as linked HTML? I mean, we're a serious language, and isn't such a principle part of the definition of being a serious language?
Haven't the 'standard' libs (aka the Hierarchical libs) they always been here with a GHC install? <ghc-version>/doc/html/... Html docs for GHC, Haskell Hierarchical Libraries (with marked-up) source, Cabal Best wishes Stephen

On Mar 8, 2010, at 1:05 PM, Stephen Tetley wrote:
Haven't the 'standard' libs (aka the Hierarchical libs) they always been here with a GHC install?
<ghc-version>/doc/html/...
Html docs for GHC, Haskell Hierarchical Libraries (with marked-up) source, Cabal
First, in GHC 6.12 there are fewer standard libraries: Only those needed to build GHC itself. Before 6.12 one could learn Haskell and get many things done without venturing into Cabal libraries. Now many of the libraries one took as "standard" in the past are Cabal installs. Meanwhile, as one gains experience with Haskell one ventures beyond the "standard" libraries, and also expects full documentation. Here's a ticket (not started by me) indicating that Cabal's default is not to make all possible documentation, and this default is hard to change: http://hackage.haskell.org/trac/hackage/ticket/517 I found this ticket because I was missing documentation that I expected. Can't tell you which files now; after my work-around I have everything that I expect. Don't get me wrong, building from source then using "cabal install" is by far the best option I know. I just wish that all options (every platform-specific binary install, Haskell Platform, source then cabal install) would provide every conceivable Haddock HTML file with links. In calculus we teach students to look both at critical points and the endpoints of an interval for optima. I'm saying here that the optimum is the "document all source code" end of the interval. It's an easy principle to articulate, and we don't follow it. I'm asking why not, and speculating that it's simply a dated habit that hasn't been reexamined recently. Hey, my primary drives are all solid state, and I have enough room for source code. In the era of $80 TB drives, this seems a no-brainer.

Am Mittwoch 10 März 2010 15:07:07 schrieb Dave Bayer:
On Mar 8, 2010, at 1:05 PM, Stephen Tetley wrote:
Haven't the 'standard' libs (aka the Hierarchical libs) they always been here with a GHC install?
<ghc-version>/doc/html/...
Html docs for GHC, Haskell Hierarchical Libraries (with marked-up) source, Cabal
First, in GHC 6.12 there are fewer standard libraries: Only those needed to build GHC itself. Before 6.12 one could learn Haskell and get many things done without venturing into Cabal libraries. Now many of the libraries one took as "standard" in the past are Cabal installs.
Actually, since 6.8 (or was it even 6.6?), you needed the extralibs bundle for a somewhat comprehensive installation to get things going smoothly. That extralibs bundle has been replaced by/expanded to the platform, which is basically a good thing (I hope that, now the base-split is done, the platform releases can follow the GHC releases more closely).
Meanwhile, as one gains experience with Haskell one ventures beyond the "standard" libraries, and also expects full documentation.
Here's a ticket (not started by me) indicating that Cabal's default is not to make all possible documentation, and this default is hard to change:
http://hackage.haskell.org/trac/hackage/ticket/517
I found this ticket because I was missing documentation that I expected. Can't tell you which files now; after my work-around I have everything that I expect.
Don't get me wrong, building from source then using "cabal install" is by far the best option I know. I just wish that all options (every platform-specific binary install, Haskell Platform, source then cabal install) would provide every conceivable Haddock HTML file with links.
Aye. I've spent several hours trying to get into the cabal-install code to offer a fix, but I've barely scratched the surface :( So for the time being, I have to resort to my evil work-around and change the Cabal sources for each new release.
In calculus we teach students to look both at critical points and the endpoints of an interval for optima. I'm saying here that the optimum is the "document all source code" end of the interval.
+1
It's an easy principle to articulate, and we don't follow it. I'm asking why not, and speculating that it's simply a dated habit that hasn't been reexamined recently. Hey, my primary drives are all solid state, and I have enough room for source code. In the era of $80 TB drives, this seems a no-brainer.
I have only 150GB and I've plenty of space for source code and hscoloured sources too.
participants (5)
-
Brent Yorgey
-
Daniel Fischer
-
Dave Bayer
-
Nicolas Couture-Grenier
-
Stephen Tetley