diff --git a/expected-failures/aws.txt b/expected-failures/aws.txt index 1e16291..3eb0998 100644 --- a/expected-failures/aws.txt +++ b/expected-failures/aws.txt @@ -1,11 +1,9 @@ -Parsing of source code failed: +The GHC parser (in Haddock mode) failed: Examples/PutBucketNearLine.hs:5:1-6 parse error on input `import' -GHC parser failed on this input, it is not an Ormolu bug. -Parsing of source code failed: +The GHC parser (in Haddock mode) failed: Examples/Sqs.hs:(88,3)-(90,4) parse error on input `{- | Let's make sure the queue was actually deleted and that the same number of queues exist at when | the program ends as when it started. -}' -GHC parser failed on this input, it is not an Ormolu bug. diff --git a/expected-failures/distributed-process.txt b/expected-failures/distributed-process.txt index 3bdf84f..16dad46 100644 --- a/expected-failures/distributed-process.txt +++ b/expected-failures/distributed-process.txt @@ -1,9 +1,7 @@ -Parsing of source code failed: +The GHC parser (in Haddock mode) failed: benchmarks/Channels.hs:2:1-6 parse error on input `import' -GHC parser failed on this input, it is not an Ormolu bug. -Parsing of source code failed: +The GHC parser (in Haddock mode) failed: benchmarks/Spawns.hs:5:1-6 parse error on input `import' -GHC parser failed on this input, it is not an Ormolu bug. diff --git a/expected-failures/esqueleto.txt b/expected-failures/esqueleto.txt index 282273d..b3d445d 100644 --- a/expected-failures/esqueleto.txt +++ b/expected-failures/esqueleto.txt @@ -1,9 +1,7 @@ -Parsing of source code failed: +The GHC parser (in Haddock mode) failed: src/Database/Esqueleto/Internal/Internal.hs:379:1 lexical error in string/character literal at character 's' -GHC parser failed on this input, it is not an Ormolu bug. -Parsing of source code failed: +The GHC parser (in Haddock mode) failed: test/PostgreSQL/Test.hs:510:9-41 parse error on input `-- | Check the result is not null' -GHC parser failed on this input, it is not an Ormolu bug. diff --git a/expected-failures/fay.txt b/expected-failures/fay.txt index 7f6556f..3d037c2 100644 --- a/expected-failures/fay.txt +++ b/expected-failures/fay.txt @@ -1,22 +1,18 @@ -Parsing of source code failed: +The GHC parser (in Haddock mode) failed: examples/Separated.hs:12:1-6 parse error on input `module' -GHC parser failed on this input, it is not an Ormolu bug. -Parsing of source code failed: +The GHC parser (in Haddock mode) failed: examples/calc.hs:(4,1)-(6,2) parse error on input `-- $ fay -p --html-wrapper --html-js-lib jquery.min.js examples/calc.hs -- You also need to download jquery.min.js. --' -GHC parser failed on this input, it is not an Ormolu bug. -Parsing of source code failed: +The GHC parser (in Haddock mode) failed: examples/canvaswater.hs:(6,1)-(7,17) parse error on input `-- | A demonstration of Fay using the canvas element to display a -- simple effect.' -GHC parser failed on this input, it is not an Ormolu bug. -Parsing of source code failed: +The GHC parser (in Haddock mode) failed: examples/data.hs:9:1-6 parse error on input `module' -GHC parser failed on this input, it is not an Ormolu bug. diff --git a/expected-failures/idris.txt b/expected-failures/idris.txt index e88738f..69064d8 100644 --- a/expected-failures/idris.txt +++ b/expected-failures/idris.txt @@ -52,19 +52,17 @@ Formatting is not idempotent: after: "timisation\n = PETra" Please, consider reporting the bug. -Parsing of source code failed: +The GHC parser (in Haddock mode) failed: src/Idris/Parser.hs:1052:1 parse error on input `@' -GHC parser failed on this input, it is not an Ormolu bug. AST of input and AST of formatted code differ. at src/Idris/Parser/Data.hs:281:1-29 Please, consider reporting the bug. -Parsing of source code failed: +The GHC parser (in Haddock mode) failed: src/Idris/Parser/Expr.hs:75:1 parse error on input `@' -GHC parser failed on this input, it is not an Ormolu bug. Formatting is not idempotent: src/Idris/PartialEval.hs:280:42 diff --git a/expected-failures/lens.txt b/expected-failures/lens.txt index 500cdba..68a4929 100644 --- a/expected-failures/lens.txt +++ b/expected-failures/lens.txt @@ -1,4 +1,3 @@ -Parsing of source code failed: +The GHC parser (in Haddock mode) failed: src/Control/Exception/Lens.hs:180:13-37 parse error on input `AllocationLimitExceeded__' -GHC parser failed on this input, it is not an Ormolu bug. diff --git a/expected-failures/pandoc.txt b/expected-failures/pandoc.txt index 221e9cc..a85921f 100644 --- a/expected-failures/pandoc.txt +++ b/expected-failures/pandoc.txt @@ -1,7 +1,6 @@ -Parsing of source code failed: +The GHC parser (in Haddock mode) failed: benchmark/weigh-pandoc.hs:14:1-6 parse error on input `import' -GHC parser failed on this input, it is not an Ormolu bug. Formatting is not idempotent: src/Text/Pandoc/Readers/Vimwiki.hs:615:19 diff --git a/expected-failures/purescript.txt b/expected-failures/purescript.txt index 461a516..53346ad 100644 --- a/expected-failures/purescript.txt +++ b/expected-failures/purescript.txt @@ -1,22 +1,18 @@ -Parsing of source code failed: +The GHC parser (in Haddock mode) failed: src/Language/PureScript/AST/Declarations.hs:478:1-17 Invalid type signature: pattern ValueDecl :: ... Perhaps you meant to use PatternSynonyms? -GHC parser failed on this input, it is not an Ormolu bug. -Parsing of source code failed: +The GHC parser (in Haddock mode) failed: src/Language/PureScript/AST/SourcePos.hs:101:1-22 Invalid type signature: pattern NullSourceSpan :: ... Perhaps you meant to use PatternSynonyms? -GHC parser failed on this input, it is not an Ormolu bug. -Parsing of source code failed: +The GHC parser (in Haddock mode) failed: src/Language/PureScript/Constants.hs:42:1-15 Invalid type signature: pattern Discard :: ... Perhaps you meant to use PatternSynonyms? -GHC parser failed on this input, it is not an Ormolu bug. -Parsing of source code failed: +The GHC parser (in Haddock mode) failed: src/Language/PureScript/Crash.hs:16:1-6 parse error on input `import' -GHC parser failed on this input, it is not an Ormolu bug. diff --git a/src/Ormolu/Exception.hs b/src/Ormolu/Exception.hs index 708ae2f..7c60e40 100644 --- a/src/Ormolu/Exception.hs +++ b/src/Ormolu/Exception.hs @@ -41,8 +41,7 @@ instance Exception OrmoluException where withIndent path ] OrmoluParsingFailed s e -> - showParsingErr "Parsing of source code failed:" s [e] - ++ "GHC parser failed on this input, it is not an Ormolu bug.\n" + showParsingErr "The GHC parser (in Haddock mode) failed:" s [e] OrmoluOutputParsingFailed s e -> showParsingErr "Parsing of formatted code failed:" s [e] ++ "Please, consider reporting the bug.\n"