[Haskell-cafe] mutually recursive modules

Jan-Willem Maessen Janwillem.Maessen at Sun.COM
Fri Sep 24 12:30:30 EDT 2004

An anecdotal note -

hbcc (the front end to the pH and Eager Haskell compilers, and also of
GRIN) contained several mutually recursive modules both in the compiler
and in the prelude.

One of the best things we ever did was get rid of the mutual recursion. 
The resulting refactoring helped us to group related pieces which had
(for historical reasons) ended up scattered.  It also cut our rebuild
time dramatically, and let us do cross-module inlining and optimization

In short, using mutual recursion was probably a bad idea, and we found
we were better off without it.

-Jan-Willem Maessen

More information about the Haskell-Cafe mailing list