Conversation
ndmitchell
left a comment
There was a problem hiding this comment.
Adding the targets to the all good message and the status bar seems reasonable, I'd be happy with that using a few cleanups. Less convinced about warnings/errors, since that is more precious real estate.
I wonder if the targets are blank if the basename of the current directory might be useful to include instead?
| allGoodMessage :: String | ||
| allGoodMessage = setSGRCode [SetColor Foreground Dull Green] ++ "All good" ++ setSGRCode [] | ||
| allGoodMessage :: [String] -> String | ||
| allGoodMessage target = setSGRCode [SetColor Foreground Dull Green] ++ "All good " ++ setSGRCode [] ++ "in " ++ concat target |
There was a problem hiding this comment.
If target is blank, as it often will be, this will look really odd - i suspect you need to hide the "in " in that case.
| (allGoodMessage target ++ " (" ++ show loadedCount ++ " module" ++ ['s' | loadedCount /= 1] ++ ", at " ++ currTime ++ ")") | ||
| : concatMap printEval evals | ||
| prettyOutput _ _ xs evals = concatMap loadMessage xs ++ concatMap printEval evals | ||
| prettyOutput Options{..} _ _ xs evals = |
There was a problem hiding this comment.
My concern is that if you have only a handful of lines (e.g. 5) then in the case where you have errors/warnings, you've added 1 header line and decreased the amount of error/warning to display - potentially by a meaningful amount.
fae8a77 to
0797065
Compare
Howdy, this patch adds the target to the status output.
This is especially useful when one has multiple
ghcidinstances running (e.g. working at the same time on an executable and libraries it depends on.)I put in a couple extra headings for the errors and warnings to give the target a reasonable place to appear in and I matched GHCi's color scheme for those.
One thing I'm not sure about is what the window title format should be: maybe it's good enough as it is since it shows the project? I also do not have a windows machine to try and get a feel.
Would appreciate feedback!
Thanks.