Omit output syntax test for fix-point tests

pull/35/head
Lennart Spitzner 2017-04-12 14:53:47 +02:00
parent 14884be8df
commit acbaba0782
2 changed files with 7 additions and 2 deletions

View File

@ -154,7 +154,9 @@ defaultTestConfig = Config
, _lconfig_altChooser = coerce $ AltChooserBoundedSearch 3
, _lconfig_columnAlignMode = coerce (ColumnAlignModeMajority 0.7)
}
, _conf_errorHandling = _conf_errorHandling staticDefaultConfig
, _conf_errorHandling = (_conf_errorHandling staticDefaultConfig)
{ _econf_omit_output_valid_check = coerce True
}
, _conf_forward = ForwardOptions
{ _options_ghc = Identity []
}

View File

@ -115,7 +115,10 @@ parsePrintModule conf filename input = do
case parseResult of
Left (_ , s ) -> return $ Left $ "parsing error: " ++ s
Right (anns, parsedModule) -> do
(errs, ltext) <- pPrintModuleAndCheck conf anns parsedModule
let omitCheck = conf & _conf_errorHandling .> _econf_omit_output_valid_check .> confUnpack
(errs, ltext) <- if omitCheck
then return $ pPrintModule conf anns parsedModule
else pPrintModuleAndCheck conf anns parsedModule
return $ if null errs
then Right $ TextL.toStrict $ ltext
else