partial fix for #1119
authorSimon Marlow <simonmar@microsoft.com>
Tue, 27 Mar 2007 15:22:15 +0000 (15:22 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Tue, 27 Mar 2007 15:22:15 +0000 (15:22 +0000)
commit1e8ae3f05cd475454f086a51da845ac0318d40e8
tree778f142d7850960116a385ab5f7195d9634077e2
parent70d12d0e3df4e262aa48bd89987f1f263dedbc2c
partial fix for #1119
Unless we're in one-shot mode, emit an error if we attempt to
demand-load interfaces for home modules.  This can only happen in one
way (that I'm aware of): typing a qualified name at the GHCi prompt
that refers to a module that isn't loaded.  Previously you got a
cryptic message about not finding an interface file, now you get:

Prelude> Foo.a

<interactive>:1:0:
    attempting to use module `Foo' (Foo.hs) which is not loaded

Of course you can still refer to package modules like this without
loading them explicitly, only home modules are affected, and the
behaviour is exactly the same as if you try to ':browse Foo' and
Foo isn't loaded.
compiler/iface/LoadIface.lhs