#5534: ghci -fobject-code strangeness
---------------------------------+------------------------------------------
Reporter: simonmar | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.4.1
Component: GHCi | Version: 7.2.1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
With this `Foo.hs`:
{{{
module Foo (b) where
a = 2
b = 3
c = 4
}}}
I get this strange behaviour:
{{{
> ghci -fobject-code
GHCi, version 7.0.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Prelude> :l foo
[1 of 1] Compiling Foo ( foo.hs, foo.o )
Ok, modules loaded: Foo.
*Foo> :browse
b :: Integer
*Foo> a
<interactive>:1:1:
Can't find interface-file declaration for variable a
Probable cause: bug in .hi-boot file, or inconsistent .hi file
Use -ddump-if-trace to get an idea of which file caused the error
In the expression: a
In an equation for `it': it = a
*Foo>
}}}
So `a` is in scope, but it can't be used. Furthermore, `:browse *Foo`
does not show `a` or `c` (it does without `-fobject-code`).
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5534>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs