stylish-haskell icon indicating copy to clipboard operation
stylish-haskell copied to clipboard

`stylish-haskell` rejects source with indented module scope

Open hvr opened this issue 10 years ago • 1 comments

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.

hvr avatar Jul 06 '13 10:07 hvr

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.

jaspervdj avatar Aug 12 '13 23:08 jaspervdj