Include parse-error in output-not-valid error message
parent
7bf2879ac0
commit
b057c49727
|
@ -144,7 +144,7 @@ pPrintModuleAndCheck traceFunc conf inlineConf parsedModule = do
|
|||
(\_ -> return $ Right ())
|
||||
(TextL.unpack output)
|
||||
let errs' = errs ++ case parseResult of
|
||||
Left{} -> [ErrorOutputCheck]
|
||||
Left x -> [ErrorOutputCheck x]
|
||||
Right{} -> []
|
||||
return (errs', output)
|
||||
|
||||
|
@ -195,7 +195,7 @@ parsePrintModuleTests conf filename input = do
|
|||
LayoutWarning str -> str
|
||||
ErrorUnknownNode str _ -> str
|
||||
ErrorMacroConfig str _ -> "when parsing inline config: " ++ str
|
||||
ErrorOutputCheck -> "Output is not syntactically valid."
|
||||
ErrorOutputCheck str -> "Output is not syntactically valid: " ++ str
|
||||
-- this approach would for if there was a pure GHC.parseDynamicFilePragma.
|
||||
-- Unfortunately that does not exist yet, so we cannot provide a nominally
|
||||
-- pure interface.
|
||||
|
|
|
@ -52,7 +52,7 @@ data BrittanyError
|
|||
| forall ast . (Data.Data.Data (XRec GhcPs ast), Outputable (Anno ast)) => ErrorUnknownNode String (XRec GhcPs ast)
|
||||
-- ^ internal error: pretty-printing is not implemented for type of node
|
||||
-- in the syntax-tree
|
||||
| ErrorOutputCheck
|
||||
| ErrorOutputCheck String
|
||||
-- ^ checking the output for syntactic validity failed
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue