Fix layout when not using --pretty
(#271)
The `layoutSmart` option appears to not behave correctly when specifying an `Unbounded` number of columns: https://github.com/quchen/prettyprinter/issues/49 ... and the symptom of this problem is that the `dhall` executable by default (i.e. without `--pretty`) renders all expressions in the long format (i.e. multiline with indentation), regardless of the number of available columns. However, the `layoutPretty` function behaves correctly with the `Unbounded` directive, so this change switches to using that when rendering output without `--pretty`.
This commit is contained in:
parent
20c4e5f460
commit
4733ef8710
|
@ -114,7 +114,7 @@ makeRender options header = do
|
|||
let doc = Pretty.pretty header <> prettyExpr e
|
||||
render h (Pretty.layoutSmart opts doc)
|
||||
else do
|
||||
render h (Pretty.layoutSmart unbounded (prettyExpr e))
|
||||
render h (Pretty.layoutPretty unbounded (prettyExpr e))
|
||||
Data.Text.Lazy.IO.hPutStrLn h ""
|
||||
|
||||
where
|
||||
|
|
Loading…
Reference in New Issue
Block a user