
Hi, I'm new to ghc codebase and I'm interested in stepping through the code in order to gain a better idea of how it all works. - Is there a way to load ghc into ghci ? and debug through it ? - What are the ways experienced ghc devs step through the code ? - Any techniques you guys recommend ? - What would your advices be for a newbie to the source code ? Thanks, Omar Mefire,

Hi Omar, You might want to narrow your scope to one part of GHC. For example, I mostly focused on the Run Time System to be able to conduct my master's thesis. Also, you might want to start off with a tiny goal, like to fix bug XYZ. Oh, and most important of all is the Commentary, which I think of as a wiki for GHC developers. http://ghc.haskell.org/trac/ghc/wiki/Commentary Cheers, Arash On 2014-10-06 17:23, Omar Mefire wrote:
Hi,
I'm new to ghc codebase and I'm interested in stepping through the code in order to gain a better idea of how it all works.
- Is there a way to load ghc into ghci ? and debug through it ? - What are the ways experienced ghc devs step through the code ? - Any techniques you guys recommend ? - What would your advices be for a newbie to the source code ?
Thanks, Omar Mefire,
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

Yeah , picking a single subsystem to get started is a very good and healthy
idea.
On Oct 6, 2014 2:50 PM, "Arash Rouhani"
Hi Omar,
You might want to narrow your scope to one part of GHC. For example, I mostly focused on the Run Time System to be able to conduct my master's thesis. Also, you might want to start off with a tiny goal, like to fix bug XYZ.
Oh, and most important of all is the Commentary, which I think of as a wiki for GHC developers. http://ghc.haskell.org/trac/ghc/wiki/Commentary
Cheers, Arash
On 2014-10-06 17:23, Omar Mefire wrote:
Hi,
I'm new to ghc codebase and I'm interested in stepping through the code in order to gain a better idea of how it all works.
- Is there a way to load ghc into ghci ? and debug through it ? - What are the ways experienced ghc devs step through the code ? - Any techniques you guys recommend ? - What would your advices be for a newbie to the source code ?
Thanks, Omar Mefire,
_______________________________________________ ghc-devs mailing listghc-devs@haskell.orghttp://www.haskell.org/mailman/listinfo/ghc-devs
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

In direct answer to your question, there's not a great way to step through the code. As far as I know, there isn't a way to load GHC into GHCi. Personally, I think a lot about the type-checker and so use -ddump-tc-trace a lot. You can line up the output with the code to see what is going on. Also, if you have a DEBUG build (devel1 or devel2 in build.mk), you can use pprTrace to print out from pure code.
But I surely second my colleagues in suggesting a small scope to start. My own start was in Template Haskell, which I found to be a great doorway in.
Richard
On Oct 6, 2014, at 11:23 AM, Omar Mefire
Hi,
I'm new to ghc codebase and I'm interested in stepping through the code in order to gain a better idea of how it all works.
- Is there a way to load ghc into ghci ? and debug through it ? - What are the ways experienced ghc devs step through the code ? - Any techniques you guys recommend ? - What would your advices be for a newbie to the source code ?
Thanks, Omar Mefire, _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
participants (4)
-
Arash Rouhani
-
Carter Schonwald
-
Omar Mefire
-
Richard Eisenberg