eagletmt / ghcmod-vim

Happy Haskell programming on Vim, powered by ghc-mod
http://www.vim.org/scripts/script.php?script_id=4473
433 stars 59 forks source link

Strange parse error with "module Foo where" when using pragmas #49

Open ghost opened 10 years ago

ghost commented 10 years ago

If a pragma is used together with a multi-line comment, and module is placed at the end of the multi-line comment, but on the same line as it ends, ghcmod-vim gives a parse error. It does not give the error if you move the module to a separate line, or if you remove the pragma. Below follows an example to trigger the error in HEAD. ghc-mod itself does not produce this error at all.

{-#LANGUAGE TemplateHaskell #-}
{-
-
-} module Main where

main :: a
main = undefined
ghost commented 10 years ago

hlint outputs the same warning, so I assume it's a hlint problem.

ghost commented 10 years ago

It's one step further than that even -- it's in haskell-src-exts. Reported here: https://github.com/haskell-suite/haskell-src-exts/issues/122