#1205: ':load foo.hs' in GHCi always compiles to bytecode
authorSimon Marlow <marlowsd@gmail.com>
Wed, 9 Jul 2008 11:08:30 +0000 (11:08 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Wed, 9 Jul 2008 11:08:30 +0000 (11:08 +0000)
commit3897d02a5c0deb5c3bfda3299a28bbef525eba84
tree9a23474273774370d3fcb5d6fac87660a3c1fdab
parent3b6382e443ed57d08dc676337621fc3d5cd0cb05
#1205: ':load foo.hs' in GHCi always compiles to bytecode

So now

  :load foo.hs       loads bytecode for foo.hs, even if foo.o exists
  :load foo          is just shorthand for :load foo.hs
  :load M            loads a module M, as object code if possible
                     (no change here)

  :set -fobject-code
  :load foo.hs       loads foo.hs as object code; an existing foo.o
                     can be used.

This turned out to be very straightforward: when building the
ModSummary for a file (summariseFile) we just ignore the object file
unless -fobject-code is on.
compiler/main/GHC.hs
docs/users_guide/ghci.xml