Commit 1204a217 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Merge pull request #1998 from dan-t/master

Pretty print fixes
parents 954be543 33f1b714
......@@ -109,7 +109,7 @@ ppGenPackageFlags flds = vcat [ppFlag f | f <- flds]
ppFlag :: Flag -> Doc
ppFlag flag@(MkFlag name _ _ _) =
emptyLine $ text "flag" <+> ppFlagName name $+$ fields
emptyLine $ text "flag" <+> ppFlagName name $+$ nest indentWith fields
where
fields = ppFieldsFiltered flagDefaults flagFieldDescrs flag
......
......@@ -284,6 +284,7 @@ ppField name fielddoc
, "includes"
, "install-includes"
, "other-modules"
, "depends"
]
showFields :: [FieldDescr a] -> a -> String
......@@ -733,7 +734,6 @@ showTestedWith (compiler, version) = text (show compiler) <+> disp version
-- and with blank lines replaced by dots for correct re-parsing.
showFreeText :: String -> Doc
showFreeText "" = empty
showFreeText ('\n' :r) = text " " $+$ text "." $+$ showFreeText r
showFreeText s = vcat [text (if null l then "." else l) | l <- lines_ s]
-- | 'lines_' breaks a string up into a list of strings at newline
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment