[Haskell-cafe] less than helpful GHC error message

Nicolas Frisby nicolas.frisby at gmail.com
Wed Dec 13 17:02:18 EST 2006

Consider the terminal session at the bottom of this message.

The extra "xc" in Test.hs was the result of me missing CTRL during an
Emacs command (I'm guessing...). Unfortunately this took 30 minutes to
find since I had far more than two modules and the error message
doesn't point this out. Sure it's a silly mistake to make, but I'm
guessing it's pretty common.

I'm running GHC 6.6 on a PPC Mac.

I know pragmas are wierd things, but could this error message be improved?


$ head -n 10000 Main.hs Test.hs
==> Main.hs <==
module Main where

import Test

main = test

==> Test.hs <==
xc{-# OPTIONS -fglasgow-exts #-}

module Test where

test = putStrLn "weee"
$ ghc --make Main

<no location info>: file name does not match module name `Main'

More information about the Haskell-Cafe mailing list