Fix pretty printing of logging output
This commit is contained in:
parent
45c5a06117
commit
d11b12676e
@ -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)
|
||||
|
@ -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') $
|
||||
|
Loading…
Reference in New Issue
Block a user