Isaac Dupree <[EMAIL PROTECTED]> wrote:

... lots of questions about the nhc98 .hi file format.

I think the easiest way to answer is just "have a look at an example
file".  There are plenty supplied with the source distribution of nhc98:
you don't even need to build it.  Look in the include/ directory.

> Must the complete set of exports of the .hs module be mentioned, or 
> (like in ghc) only the ones necessary for booting?

Only those necessary for booting.

> the complete type must be mentioned for syntax reasons, e.g.
> {-# NEED Foo #-}
> data Foo = Bar
> rather than allowing to say
> data Foo

No, if Foo is exported abstractly, then the latter is fine.  It is only
if a partial set of constructors is exported, then the first form must
be used, and the NEED must say which entities are exported.

> ?  Do the unNEEDed parts have to be accurate?

Kind of.  In a datatype decl, it is important that the number and order
of constructors is the same as in the source definition, but the actual
names of the non-exported constructors do not matter.

> > Sections of the file are introduced by
> >     interface ! Foo.Bar
> 
> is "Foo.Bar" a module name or a qualified name there?

A module name.

> -how is it "sections  of the file"?

Everything between one "interface" keyword and the next "interface"
keyword belongs (originally) to the named module.  This is so that, when
object code is generated, the symbols are correctly qualified by the
location of the original definitions, not by the module they are
re-exported from.

Regards,
    Malcolm

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to