[Haskell-cafe] What is the best way to understand large programs?

Stefan O'Rear stefanor at cox.net
Sun Jan 28 17:59:22 EST 2007


Hello.  I am trying to fully understand yi as quickly as possible.
Yi, like most big programs, consists of a number of modules;
e.g. Yi.UI, Yi.Buffer, etc.  Since I am not smart enough to
understand all the modules at once, I am trying to understand them one
at a time (is this itself the problem?); however, since mutual
dependencies exist, I can't do it that easily, since understanding
module A requires knowledge of the interface of module B requires
knowledge of the implentation of module B requires knowledge of the
interface of module A requires knowledge of the implementation of
module B (and my brain's lazy fix is not very good).  Yi has haddock-style
comments (despite not being a library), so I tried using ./Setup.lhs
haddock for readable side references, however this failed on CPP
markup. After asking on #haskell, newsham noted that he had filed a
cabal bug (#102), but the bug's page notes:

Haddock generates interface documentation. That's only appropriate for
libraries, isn't it?

So, if haddock isn't what I want, what is?  Or am I going at this
completely wrong?  What is the recommended way to approach a largish
program like yi or lambdabot?  (and if haddock is the wrong way to
handle this, why does yi have haddock comments?)

Note: I *have* managed to pretty thourougly understand lambdabot, but
      it took a while, wasn't particularly easy, and anyway
      lambdabot's dependency groups are quite small compared to eg
      lambdabot's.  I'm hoping to make things easier for myself.

Stefan


More information about the Haskell-Cafe mailing list