#2542: runghc does not infer module file extensions
----------------------+-----------------------------------------------------
 Reporter:  judah     |          Owner:  igloo  
     Type:  bug       |         Status:  new    
 Priority:  high      |      Milestone:  6.10.1 
Component:  Compiler  |        Version:  6.8.3  
 Severity:  normal    |     Resolution:         
 Keywords:            |     Difficulty:  Unknown
 Testcase:            |   Architecture:  Unknown
       Os:  Unknown   |  
----------------------+-----------------------------------------------------
Comment (by simonmar):

 Yes, the change was deliberate, but I agree it's not ideal and we should
 try to fix it.  I just don't know what to do about it.

 The problem is that people wanted a way to say "load this file with the
 interpreter only, ignore any compiled code for it".  And the solution we
 adopted for this was to say that any target named by ''filename'' (rather
 than ''module'') would be loaded with the interpreter.  But the problem is
 that previously `:load Setup` would look for a filename `Setup.hs` and
 load that, but that's wrong: we don't want `:load Setup` to always use the
 interpreter.  So I made `:load Setup` treat `Setup` as a module name,
 which seems more correct.  The problem is that now `:load Setup` will
 expect to find a module called `Setup` when it reads `Setup.hs`, which it
 often won't.

 So I could probably add an exception for this case and make it work again,
 but it would be ugly, and hard to document without being thoroughly
 confusing.  Can anyone think of a plan that is simple, easy to explain and
 implement, and doesn't break existing practice too much?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2542#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to