[Haskell-cafe] Re: Module.T naming style

Simon Marlow simonmar at microsoft.com
Fri Jul 15 10:23:18 EDT 2005

On 15 July 2005 11:53, Malcolm Wallace wrote:

> "Simon Marlow" <simonmar at microsoft.com> writes:
>> I hope you weren't including GHC in "most compilers" :-)  GHC's
>> implementation of mutually recursive modules is conformant with
>> Haskell 98 (see Section 5.7).
> It depends on how you interpret this phrase:
>     "may require that imported modules contain additional information"
> If you count writing a separate .hs-boot file as being the additional
> information that is somehow "contained" within the module, then I
> suppose nhc98 is also conformant with the report.

True, I considered mentioning this detail, but decided against it - the
fact that the type signatures aren't actually in the same file isn't
really important.  We follow the spirit of the specification.

You guys should really document that nhc98 support mut. rec. modules

> The only difference with nhc98 is that you hand-write a .hi file,
> rather than a .hs-boot file, but the syntax is very similar to plain
> Haskell.  Also, the hand-written .hi file will be replaced with a
> machine-generated one after compilation, but that is only a problem
> if the user inadvertently removes all the .hi files.

Hand-writing .hi files is how GHC used to work (up to version 0.29,
IIRC).  It's not entirely satisfactory because you can get into
situations where you have to 'make' several times to get to a fixed
point, and you can construct examples that never reach a fixed point.
And 'make' complains about recursive dependencies a lot.  What does
hmake do?

It used to be Really Fun(TM) when GHC was built like this...  you could
improve GHC's performance by simply typing 'make' a couple more times to
let the inter-module optimisations propagate a bit further :)


More information about the Haskell-Cafe mailing list