Restore missing line in dhall output (#270)

The `dhall` executable was missing the empty line separating the type
from the normalized form when run without the `--pretty` flag.  This
change fixes that.
This commit is contained in:
Gabriel Gonzalez 2018-02-16 08:29:26 -08:00 committed by GitHub
parent 7f29209ffd
commit 20c4e5f460
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,14 +108,14 @@ makeRender options header = do
then Pretty.renderIO h (fmap annToAnsiStyle doc)
else Pretty.renderIO h (Pretty.unAnnotateS doc)
return $ \h e ->
return $ \h e -> do
if unHelpful (pretty options)
then do
let doc = Pretty.pretty header <> prettyExpr e
render h (Pretty.layoutSmart opts doc)
Data.Text.Lazy.IO.hPutStrLn h ""
else do
render h (Pretty.layoutSmart unbounded (prettyExpr e))
then do
let doc = Pretty.pretty header <> prettyExpr e
render h (Pretty.layoutSmart opts doc)
else do
render h (Pretty.layoutSmart unbounded (prettyExpr e))
Data.Text.Lazy.IO.hPutStrLn h ""
where