Fix pretty printing of logging output

This commit is contained in:
Daniel Gröber 2015-05-05 16:09:54 +02:00
parent 45c5a06117
commit d11b12676e
2 changed files with 3 additions and 3 deletions

View File

@ -222,7 +222,7 @@ updateHomeModuleGraph' env smp0 = do
Left errs -> do
-- TODO: Remember these and present them as proper errors if this is
-- the file the user is looking at.
gmLog GmWarning ("preprocess' " ++ show fn) $ vcat $ map strDoc errs
gmLog GmWarning ("preprocess " ++ show fn) $ empty $+$ (vcat $ map text errs)
return Nothing
imports :: ModulePath -> String -> DynFlags -> MaybeT m (Set ModulePath)

View File

@ -60,8 +60,8 @@ gmLog level loc' doc = do
GhcModLog { gmLogLevel = level' } <- gmlHistory
let loc | loc' == "" = empty
| otherwise = empty <+>: text loc'
msg = gmRenderDoc $ (gmLogLevelDoc level <> loc) <+>: doc
| otherwise = text loc' <+>: empty
msg = gmRenderDoc $ gmLogLevelDoc level <+>: sep [loc, doc]
msg' = dropWhileEnd isSpace msg
when (Just level <= level') $