GHCi and -O [was: Re: ANNOUNCE: GHC 5.02.3 released]

Simon Marlow simonmar@microsoft.com
Tue, 9 Apr 2002 11:08:06 +0100


> This made me think about using *.o-files in GHCi generated w/ 'ghc
> -O2'. My GHCi (currently 5.00.2) states:
>=20
> --- snip ---
> warning: -O conflicts with --interactive; -O turned off.
> --- snap ---
>=20
> if I pass -O2 to ghci.
>=20
> Additionally, I recall some core-dumps or having ghci sometimes report
> missing symbols if using some modules compiled w/ optimization.
>=20
> So, is GHCi supposed to work w/ optimized modules after all?

Sure, GHCi is supposed to be able to load optimised object code just as
well as non-optimised object code.  If it doesn't, this is a bug.

Cheers,
	Simon