[nhc-bugs] Nit: File Parsing Error Messages

Brent Fulgham brent.fulgham@xpsystems.com
Wed, 30 May 2001 11:26:18 -0700


Under the Cygwin build, a poorly-indented source file:

--
--  Note indention at line #8
--
module Main where

import IO

add :: Integer -> Integer -> Integer
add x y = x + y

  inc   = add 1
-- ^^^ Indented two spaces

main = do
  putStrLn ("Hello, World.")

--
-- End program
--

This results in the somewhat confusing error message:

$ hmake test
nhc98    -c -o test.o test.hs
In file ./test.hs:
8:9 Found = but expected a {-EOF-}

It might be better if it indicated the indentation was at issue.

Correcting the indentation results in a successful compile.

I have not verified this on a "real" system (Linux/BSD/etc.),
so it's possible it's limited to Cygwin's environment.

Thanks,

-Brent