[GHC] #1205: ghci reports functions not in scope after loading a .hs, if there is a .o present

GHC trac at galois.com
Wed Mar 7 04:18:52 EST 2007


#1205: ghci reports functions not in scope after loading a .hs, if there is a .o
present
-----------------------------+----------------------------------------------
 Reporter:  guest            |          Owner:         
     Type:  feature request  |         Status:  new    
 Priority:  normal           |      Milestone:  _|_    
Component:  GHCi             |        Version:  6.6    
 Severity:  normal           |     Resolution:         
 Keywords:                   |     Difficulty:  Unknown
 Testcase:                   |   Architecture:  Unknown
       Os:  Unknown          |  
-----------------------------+----------------------------------------------
Changes (by simonmar):

  * milestone:  => _|_
  * type:  bug => feature request

Comment:

 Personally I don't consider this a bug: the behaviour is clearly
 documented, and GHC tells you that it is loading the `.o` file in the
 output from `:load`.  The fact that `:load foo` is just shorthand for
 `:load foo.hs` is a good thing, IMO.

 If you want to force compilation, then `:!touch foo.hs` works fine.  Given
 this, the argument that we should provide special support seems weak, to
 me.  You can even define a macro, e.g.
 {{{
  :def interpret (\str -> return (":!touch " ++ str ++  "\n:load " ++ str))
 }}}

 I'll leave this open as a feature request in case others want to comment.
 If there's a concensus for a change, we can turn it into a task.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1205>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list