haskell / haskell/stylish-haskell

ParseFailed on {-# LANGUAGE

オープン
#41 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Haskell
スター
1k
フォーク
153
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。