How to start with GHC development?

Dear list, I would like to learn about internals of GHC and contribute to its development in the future. I read a couple of papers that give a very general overview of GHC (chapter from AoS, papers about inliner and multicore support) and I'm thinking what direction should I pursue now. I was thinking about: a) getting GHC sources, reading the commentary on the GHC wiki and hacking the code b) reading SPJs "Implementing Functional Languages: a tutorial" c) reading SPJs "The Implementation Of Functional Languages" book I would definitely go for a), but I don't know if I'll manage to understand the code without knowing how functional languages are compiled. I have a rather basic knowledge of compilers in general - I took Stanford's online course on Compilers at Coursera. Should I get more theoretical knowledge? Any advice is greatly appreciated. Janek

I'm in the same boat, with just a little less reading. :)
It seems to be that if we want to encourage participation in GHC
development, the first step is to lower the barrier of entry.
One way to do that would be to have a page (wiki, perhaps) that has a
reading list for learning about GHC. I'd guess that there are a lot of
people like Janek and myself who want to contribute, even a little, and
just aren't sure about where to start. We're happy to do our homework, but
we need some assignments, so to speak.
Another idea is to have a list of open tasks grouped by how difficult they
will be and how much knowledge of Haskell and GHC will be required. This is
somewhat at odds with the earlier suggestion to have domains in codebase,
with separate de facto maintainers for each. However, it would make it
easier for others to contribute. I could also see where the domain
maintainers could put simpler tasks into a global index. That might mix the
best of both.
I'll be happy to start accumulating information for the wiki page. I'm in
the middle of drafting a book, however, so it'll be Feb at the earliest
before I can really pay significant attention to it.
Best,
Eric
On Tue, Dec 11, 2012 at 8:58 AM, Janek S.
Dear list,
I would like to learn about internals of GHC and contribute to its development in the future. I read a couple of papers that give a very general overview of GHC (chapter from AoS, papers about inliner and multicore support) and I'm thinking what direction should I pursue now. I was thinking about:
a) getting GHC sources, reading the commentary on the GHC wiki and hacking the code b) reading SPJs "Implementing Functional Languages: a tutorial" c) reading SPJs "The Implementation Of Functional Languages" book
I would definitely go for a), but I don't know if I'll manage to understand the code without knowing how functional languages are compiled. I have a rather basic knowledge of compilers in general - I took Stanford's online course on Compilers at Coursera. Should I get more theoretical knowledge? Any advice is greatly appreciated.
Janek
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

One way to do that would be to have a page (wiki, perhaps) that has a reading list for learning about GHC. Well, I think that GHC wiki has really decent commentary. I'm just not sure if reading it will be enough to get started (probably not). So guidance would be appreciated :)
Janek

On 12/11/12 9:29 AM, Janek S. wrote:
One way to do that would be to have a page (wiki, perhaps) that has a reading list for learning about GHC. Well, I think that GHC wiki has really decent commentary. I'm just not sure if reading it will be enough to get started (probably not). So guidance would be appreciated :)
My general approach is to dig into the code. After you've gotten a look at it, you'll have a better idea what parts of the wiki are worth focusing on. And after reading you can dig a bit deeper. Iterate. -- Live well, ~wren

Eric Rochester
Another idea is to have a list of open tasks grouped by how difficult they will be and how much knowledge of Haskell and GHC will be required. This is somewhat at odds with the earlier suggestion to have domains in codebase, with separate de facto maintainers for each. However, it would make it easier for others to contribute. I could also see where the domain maintainers could put simpler tasks into a global index. That might mix the best of both.
It doesn't have to be at odds with the domain suggestion. In fact they can be combined neatly. The maintainer of a domain is the best person to judge the difficulty of a task, so they can assign the difficulty levels. A new GHC developer can then view all tasks from all domains sorted by difficulty and start with the easiest ones. To me this sounds like a great idea to encourage people to join GHC development. I'm very interested myself, as I actually have some experience writing compilers for statically typed lazy languages (including STG compilation), but unfortunately my spare time is very limited. However, I would like to solve at least some easy tasks to get going. As for Simon Marlow's legacy perhaps this is the opportunity to reevaluate the current run-time system and make it more transparent, more modular as well as easier to substitute/customize. This could open the doors to using GHC for low level systems programming up to the point where you can write kernels in Haskell. This is something I am particularly interested in. Greets, Ertugrul -- Not to be or to be and (not to be or to be and (not to be or to be and (not to be or to be and ... that is the list monad.

On Tue, Dec 11, 2012 at 6:10 AM, Eric Rochester
I'm in the same boat, with just a little less reading. :)
It seems to be that if we want to encourage participation in GHC development, the first step is to lower the barrier of entry.
One way to do that would be to have a page (wiki, perhaps) that has a reading list for learning about GHC. I'd guess that there are a lot of people like Janek and myself who want to contribute, even a little, and just aren't sure about where to start. We're happy to do our homework, but we need some assignments, so to speak.
The GHC developers have created a list to help with this, look at the easy bugs and tasks: http://hackage.haskell.org/trac/ghc/wiki/GettingStarted
Another idea is to have a list of open tasks grouped by how difficult they will be and how much knowledge of Haskell and GHC will be required.
They already thought of this and did it :) Jason

On 12/11/12 8:58 AM, Janek S. wrote:
Dear list,
I would like to learn about internals of GHC and contribute to its development in the future. I read a couple of papers that give a very general overview of GHC (chapter from AoS, papers about inliner and multicore support) and I'm thinking what direction should I pursue now. I was thinking about:
a) getting GHC sources, reading the commentary on the GHC wiki and hacking the code b) reading SPJs "Implementing Functional Languages: a tutorial" c) reading SPJs "The Implementation Of Functional Languages" book
I would definitely go for a), but I don't know if I'll manage to understand the code without knowing how functional languages are compiled. I have a rather basic knowledge of compilers in general - I took Stanford's online course on Compilers at Coursera. Should I get more theoretical knowledge? Any advice is greatly appreciated.
One bit of advice is to sign up for the

Other than that, it's hard to say. What part of the compiler are you (most) interested in hacking on? The type system? The compilation down to C-- and LLVM? The concurrency and parallelism? Debugging, testing, and fuzzing? ... At the moment it's concurrency and parallelism, but I guess that at some point I might like to
Dnia środa, 12 grudnia 2012, wren ng thornton napisał: play with the type system. Janek

On 12/12/12 3:07 AM, Janek S. wrote:
Dnia środa, 12 grudnia 2012, wren ng thornton napisał:
Other than that, it's hard to say. What part of the compiler are you (most) interested in hacking on? The type system? The compilation down to C-- and LLVM? The concurrency and parallelism? Debugging, testing, and fuzzing? ...
At the moment it's concurrency and parallelism, but I guess that at some point I might like to play with the type system.
In that case I'd suggest reading some of the papers on STM, DPH, REPA, and Cloud Haskell, and then just diving into the GHC code. It's been a while since I've read them, but SPJ's classic books don't have a whole lot about concurrency/parallelism IIRC. For the type system, I highly recommend reading [1]. It's long but it's more of an introductory/tutorial sort of paper, so it's easy reading. Also, unlike most intro/tutorial papers, it goes all the way through System F (H98 minus type classes, plus RankNTypes), whereas most intros only show Hindley--Damas--Milner (SML). On the one hand, HDM is a good starting place because it's such an easy type system with a very nice power/weight ratio, but if you're interested in hacking on modern Haskell we're so far beyond HDM that starting there would only slow you down, since we can no longer take advantage of a number of simplifying assumptions that HDM makes. ... After you've read that paper, you'll probably want to take a look at one of the newer Fc papers, which adds in GADTs, type families, and other GHC Haskellisms. After that you should be ready to start hacking, though you'll need to backfill some of the theory from time to time. [1] http://research.microsoft.com/en-us/um/people/simonpj/papers/higher-rank/ -- Live well, ~wren
participants (5)
-
Eric Rochester
-
Ertugrul Söylemez
-
Janek S.
-
Jason Dagit
-
wren ng thornton