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

Simon Marlow
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:
> --- snip ---
> warning: -O conflicts with --interactive; -O turned off.
> --- snap ---
> if I pass -O2 to ghci.
> Additionally, I recall some core-dumps or having ghci sometimes report
> missing symbols if using some modules compiled w/ optimization.
> 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.