haskell/haskell-mode — pull request #177 by chrisdone (2013-07-06 22:31:52+00:00)
Title: Auto-import in GHCi process of depended modules on load

The purpose of this change is to battle of the problem of type information not being in scope when doing things in the GHCi REPL. If you're loading with normal GHCi interpreted, then you get all type information. But if you're using `-fobject-code`, like you do in a real project of 50+ modules, that information isn't available.

So what this does is when GHCi says:

> OK, modules loaded: Foo, Bar.

Then `haskell-process-auto-import-loaded-modules` will run:

> :m + Foo Bar

And if your project is:

module Zot where
import X as XXX
import T (p)

then `haskell-process-auto-send-import-statements` will run:

> import X as XXX
> import X (p)

This means you're pretty much working with all the type information—of top-level symbols and data types—available.