GHC 6.4 release candidates available

Simon Marlow simonmar at microsoft.com
Fri Mar 4 08:13:25 EST 2005


On 04 March 2005 12:58, Keean Schupke wrote:

> There can only be one top level module in ghci (there can only
> be one module name before the '>' prompt - that modules options
> should be in effect.

No, you can have multiple top-level module scopes in effect.  See the
GHCi documentation.

> Simon Marlow wrote:
> 
>> I think GHC's behaviour is right here.  To use the flag settings from
>> the source module on the command-line would be wrong: for example,
>> when the module is compiled, its implementation (and therefore flag
>> settings) must be hidden. 
>> 
>> 
> Requiring options on the command line exposes the implementation
> I do not expect the GHCi user to be required to know which flags to
> apply to get my code to run.

Why not?  You're providing a library which exports some instances.  If
overlapping instance resolution is required to resolve overloading in
code that uses the library, I want to know about it, and I don't want
the compiler to turn on overlapping instance resolution behind my back.

Importing a library should *not* affect how the code that imports it is
compiled, except in the ways you expect (bringing names and instances
into scope).

If you could specify overlapping on a per-instance basis, then that
would be a way around the problem.

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list