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
|
Left errs -> do
|
||||||
-- TODO: Remember these and present them as proper errors if this is
|
-- TODO: Remember these and present them as proper errors if this is
|
||||||
-- the file the user is looking at.
|
-- 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
|
return Nothing
|
||||||
|
|
||||||
imports :: ModulePath -> String -> DynFlags -> MaybeT m (Set ModulePath)
|
imports :: ModulePath -> String -> DynFlags -> MaybeT m (Set ModulePath)
|
||||||
|
@ -60,8 +60,8 @@ gmLog level loc' doc = do
|
|||||||
GhcModLog { gmLogLevel = level' } <- gmlHistory
|
GhcModLog { gmLogLevel = level' } <- gmlHistory
|
||||||
|
|
||||||
let loc | loc' == "" = empty
|
let loc | loc' == "" = empty
|
||||||
| otherwise = empty <+>: text loc'
|
| otherwise = text loc' <+>: empty
|
||||||
msg = gmRenderDoc $ (gmLogLevelDoc level <> loc) <+>: doc
|
msg = gmRenderDoc $ gmLogLevelDoc level <+>: sep [loc, doc]
|
||||||
msg' = dropWhileEnd isSpace msg
|
msg' = dropWhileEnd isSpace msg
|
||||||
|
|
||||||
when (Just level <= level') $
|
when (Just level <= level') $
|
||||||
|
Loading…
Reference in New Issue
Block a user