diff --git a/Language/Haskell/GhcMod/HomeModuleGraph.hs b/Language/Haskell/GhcMod/HomeModuleGraph.hs index 12badf2..7aafc16 100644 --- a/Language/Haskell/GhcMod/HomeModuleGraph.hs +++ b/Language/Haskell/GhcMod/HomeModuleGraph.hs @@ -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) diff --git a/Language/Haskell/GhcMod/Logging.hs b/Language/Haskell/GhcMod/Logging.hs index 37684a5..142bd40 100644 --- a/Language/Haskell/GhcMod/Logging.hs +++ b/Language/Haskell/GhcMod/Logging.hs @@ -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') $