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

Lennart Augustsson lennart at augustsson.net
Wed Mar 7 15:01:50 EST 2007


Personally, I find it very counter-intuitive that asking for Foo.hs  
to be loaded actually loads Foo.o.  No matter how documented it is,  
it seems odd.


On Mar 7, 2007, at 09:18 , GHC wrote:

> #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_______________________________________________
> Glasgow-haskell-bugs mailing list
> Glasgow-haskell-bugs at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs




More information about the Glasgow-haskell-bugs mailing list