Skip to content
  • Simon Marlow's avatar
    partial fix for #1119 · 1e8ae3f0
    Simon Marlow authored
    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.
    1e8ae3f0