stylish-haskell
stylish-haskell copied to clipboard
`stylish-haskell` rejects source with indented module scope
The program below is rejected by stylish-haskell
module Blah where
import Prelude (IO,return)
main :: IO ()
main = do
return ()
with the parse error
Language.Haskell.Stylish.Parse.parseModule: could not parse Blah.hs: ParseFailed (SrcLoc {srcFilename = "<unknown>.hs", srcLine = 5, srcColumn = 3}) "Parse error: main"
whereas ghc
happily accepts that program.
This looks like a haskell-src-exts issue, the library stylish-haskell uses for parsing Haskell. I suggest writing to the author of that library.