[Haskell-cafe] why is ghci trying to load hsc file ??

briand at aracnet.com briand at aracnet.com
Sun Feb 27 06:36:34 CET 2011


On Sat, 26 Feb 2011 18:18:27 -0800 (PST)
Brandon Moore <brandon_m_moore at yahoo.com> wrote:

> I assume there's a LINE directive in the file it's actually reading.
> Run ghci with -v to see what file it's actually trying to read.
> 
> 
>       

Here's the relevant output with -v flag:


compile: input file dist/build/Bindings/HDF5.hs
*** Checking old interface for main:Bindings.HDF5:
[1 of 2] Compiling Bindings.HDF5    ( dist/build/Bindings/HDF5.hs,
interpreted ) *** Parser:

src/Bindings/HDF5.hsc:49:8: parse error on input `import'


This is very weird.

HDF5.hs file has LINE scattered throughout, but they are in comments:

{-# LINE 15 "src/Bindings/HDF5.hsc" #-}

or are they ?  I assumed the purpose of this was line # annotation to
let you know where the line in the .hs file comes from in the .hsc
file.

regardless, there is NO "LINE 49" directive, and the HDF5.hs file is
blank on line 49.

The first line with import (@ 165) is this :

foreign import ccall "H5Dcreate2" c'H5Dcreate2
  :: CInt -> CString -> CInt -> CInt -> CInt -> CInt -> CInt -> IO

I'm trying to figure out if that's legal syntax.

Very strange.  Reporting errors on lines that don't exist makes it
harder to debug :-(

Brian



More information about the Haskell-Cafe mailing list