[Haskell-cafe] Mystery Parse Error in LHS file

Daniel Fischer daniel.is.fischer at web.de
Thu May 6 11:35:58 EDT 2010


On Thursday 06 May 2010 17:02:59, Iæfai wrote:
> I have an lhs file, 'starsystem.lhs' that is not compiling because of
> a parse error. 
>
> I cannot figure out what the problem here is.

Apparently, unlit doesn't manage to cope with mixed LaTeX and bird-track.
http://haskell.org/onlinereport/syntax-iso.html#sect9.4 says:
"It is not advisable to mix these two styles in the same file."

The output of unlit looks like:
----------------------------------------------------------------------
#line 1 "parseErr.lhs"
  {-# LANGUAGE ForeignFunctionInterface #-}

  import Graphics.Rendering.OpenGL as GL
  import Graphics.UI.GLFW as GLFW

  foreign import ccall unsafe "unbundled" c_unbundled :: IO ()

  data Action = Action (IO Action)

main :: IO ()
main = do
  c_unbundled
  GLFW.initialize
  -- open window
----------------------------------------------------------------------

(snipped most). You can see the parse error there, can't you?

Maybe file a GHC bug/feature request?

> I have tried it in a
> regular hs file and it works. I have posted full source here:
> http://hpaste.org/fastcgi/hpaste.fcgi/view?id=25352#a25352
>
> Any thoughts would be welcome.



More information about the Haskell-Cafe mailing list