Stepping through ghc

Richard Eisenberg eir at cis.upenn.edu
Tue Oct 7 14:16:15 UTC 2014


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 <omefire at yahoo.fr> 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 at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20141007/e624132e/attachment.html>


More information about the ghc-devs mailing list