[GHC] #2542: runghc does not infer module file extensions
GHC
trac at galois.com
Tue Aug 26 06:14:00 EDT 2008
#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, but that would be an exception. There are currently two cases:
* a module name: search for the source file using the normal search
semantics
(`-i` search path, hierarchical module names etc.), load compiled code
if
available, require the module name in the file to be correct.
* a filename ending in `.hs` or `.lhs`, or missing the extension: load
exactly that file, which can contain any module, and in GHCi ignore any
compiled version.
there would be an extra case, to come first:
* for target `X`, if `X.hs` or `X.lhs` exists, load that file, which can
contain any module, and in GHCi load compiled code if available.
this would change the behaviour of `:load foo` (it would load compiled
code, whereas `:load foo.hs` wouldn't).
My main objection to this is that three cases feels like one too many to
me.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2542#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list