haskell / haskell/stylish-haskell

ParseFailed on {-# LANGUAGE

Đang mở
#41 5 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Haskell
Star
1k
Fork
153
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Language.Haskell.Stylish.Parse.parseModule: could not parse Google.hs: ParseFailed (SrcLoc {srcFilen
ame = ".hs", srcLine = 1, srcColumn = 4}) "Parse error: {-# LANGUAGE"

source:

``` haskell
{-# LANGUAGE UnicodeSyntax #-}
module Google
( getLastVersionForPlatform
, getChromium
) where
```

output

``` shell
D:\Heather\Contrib\haskell\Cr\src>stylish-haskell.exe -vi Google.hs
D:\Heather\Contrib\haskell\Cr\src\.stylish-haskell.yaml exists
Loading configuration at D:\Heather\Contrib\haskell\Cr\src\.stylish-haskell.yaml
Enabled Imports step
Enabled LanguagePragmas step
Enabled Records step
Enabled TrailingWhitespace step
Extra language extensions: []
Language.Haskell.Stylish.Parse.parseModule: could not parse Google.hs: ParseFailed (SrcLoc {srcFilen
ame = ".hs", srcLine = 1, srcColumn = 4}) "Parse error: {-# LANGUAGE"
```

file was UTF-8

Converted to UTF-8 without BOM, now works...

I'm not sure if that should already works on UTF8 with bom according this commit https://github.com/jaspervdj/stylish-haskell/commit/3598ec21fbd215350940ae064c38f0c756cef916

Also maybe this issue should be merged with https://github.com/jaspervdj/stylish-haskell/issues/3

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.