[GHC] #1051: Insufficient location information for parse errors
before ''module'' keyword
GHC
trac at galois.com
Thu Dec 14 00:10:02 EST 2006
#1051: Insufficient location information for parse errors before ''module''
keyword
----------------------------+-----------------------------------------------
Reporter: nfrisby | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.6
Severity: normal | Keywords: error message
Difficulty: Easy (1 hr) | Testcase:
Architecture: Multiple | Os: Multiple
----------------------------+-----------------------------------------------
I've seen this error with GHC 6.6 on a PPC Mac (10.4.8), but I suspect it
happens on multiple systems.
Consider ''Main.hs''
{{{
module Main where
import Test
main = test
}}}
and ''Test.hs''
{{{
mmmodule Test where
test = putStr "stutter"
}}}
The error message for trying to load the Main module is
{{{
$ ghci Main
[snip]
Loading package base ... linking ... done.
<no location info>: file name does not match module name `Main'
Failed, modules loaded: none.
Prelude>
}}}
This provides no information regarding the actual location of the error.
In a program of a considerable number of modules, the offending module can
be difficult to track down. Moreover, the error provides no direct
indication that there's a source file without the module keyword in it.
The path of the offending file should be included in the error.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1051>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list