GHC Poll: scope in GHCi

Simon Marlow
Wed, 9 Jan 2002 14:35:28 -0000

>  | Does anyone have any better suggestions?
> I think any solution that leaves it transparent as to if it
> is a compiled or an interpreted module is fine.

I'm currently showing the scope in the prompt, with the modules from
which we're taking the exports only surrounded by square brackets. Eg.


Just the exports of the Prelude are in scope


The exports from Prelude and IO are in scope


The whole top-level scope of module Main=20

The whole top-level scope of Main, plus additionally the exports of IO


The combined top-level scopes of A and B.

So this doesn't really tell you which modules are compiled vs.
interpreted but it does give you a good indication of what the current
scope is.  I can easily add another command to show the currently loaded
modules, including which ones are interpreted - something like

	> :show modules
	Main	( Main.hs, interpreted )
	Foo	( Foo.hs,  Foo.o )

And maybe

	> :show bindings
	x :: Int
	f :: Int -> Bool

Any other show-type things that might be useful?