Some pretty printing "improvements" (hopefully)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user