GHCI incorrectly link symbols defined with foreign import ccall
I have a problem that ghci when loads modules that uses external symbols incorrectly links them, the problem is not reproducible if I'm compiling executable or load modules with :load command.
As a result every Pointer value is equivalent to constant 0x0000fffffff225ff.
A minimal example is in attached link, it contains a small package and description how to reproduce a bug.
Problem is also reproduces on the ghc-HEAD.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | hvr |
| Operating system | Unknown/Multiple |
| Architecture |