GHCi doesn't load .dyn_o files appropriately
Now that GHCi generally defaults to dynamic linking, it handles dynamic object files. But it doesn't implicitly handle the -dynamic-too case appropriately:
$ cat Test.hs
main = return ()
$ ./inplace/bin/ghc-stage2 -dynamic Test.hs
[1 of 1] Compiling Main ( Test.hs, Test.o )
Linking Test ...
$ ./inplace/bin/ghc-stage2 --interactive Test
GHCi, version 7.8.20140130: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Ok, modules loaded: Main.
Prelude Main> ^D
$ ./inplace/bin/ghc-stage2 -dynamic-too Test.hs
[1 of 1] Compiling Main ( Test.hs, Test.o )
Linking Test ...
$ ./inplace/bin/ghc-stage2 --interactive Test
GHCi, version 7.8.20140130: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
[1 of 1] Compiling Main ( Test.hs, interpreted )
Ok, modules loaded: Main.
*Main>
Also:
$ ./inplace/bin/ghc-stage2 --interactive Test.dyn_o
GHCi, version 7.8.20140130: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Warning: ignoring unrecognised input `Test.dyn_o'
Prelude>
but it does handle the .o case. This should all be fixed and merged to 7.8 since it'll likely be very annoying.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.8.1-rc1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |