:l XX libFoo.a

Simon Marlow simonmar@microsoft.com
Thu, 26 Apr 2001 09:55:42 +0100

> The  :load  command of the  ghc-5.00  interpreter=20
> first searches the needed compiled modules (*.o) and loads them
> when finds.
> But how to make it to search them in the object code library =20
> xxx/libFoo.a  ? =20
> For it is better to keep the fixed *.o files in a library.
> And `:load' works in the above situation similarly as =20
>                                                    ghc -o XX.o ...
> I tried               :l XX libFoo.a,
> but it does not work.

GHCi can't load ordinary .a libraries, only .o/.so objects.  However,
you can make a .o from a .a using something like

	$ ld --whole-archive -o Foo.o -lFoo

Perhaps we'll have a way to make this slightly less painful in the