Some pretty printing "improvements" (hopefully)

This commit is contained in:
Daniel Gröber 2015-08-18 04:54:10 +02:00
parent f7149ba23f
commit 90b1e452e2
1 changed files with 6 additions and 1 deletions

View File

@ -55,11 +55,16 @@ fnDoc :: FilePath -> Doc
fnDoc = doubleQuotes . text
showDoc :: Show a => a -> Doc
showDoc = text . show
showDoc = strLnDoc . show
warnDoc :: Doc -> Doc
warnDoc d = text "Warning" <+>: d
strLnDoc :: String -> Doc
strLnDoc str = doc (dropWhileEnd isSpace str)
where
doc = lines >>> map text >>> foldr ($+$) empty
strDoc :: String -> Doc
strDoc str = doc (dropWhileEnd isSpace str)
where