You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Colour lines of HTML report, to make it easier to see parentage #5
When viewing deep callstacks, it's hard to see which call sites share a caller of interest. It would be clearer if the lines were coloured, as in this mockup, where the colours make it immediately clear that runParserWithModeComments calls mparseExp and ngparseModulePragmas:
If I'm not mistaken, the simplest clean way to do this would be to replace:
(showHTML links . rootLabel) with (showHTML links . (0,) . rootLabel) (if you don't mind adding the TupleSections extension);
showHTML::Set.SetString-> (Int, Val) ->String
showHTML xs (indent, Val{..}) =
(col $ intercalate "" [showDouble timeTot, showDouble timeInh, showDouble timeInd]) ++""++
[spc ++ (if name `Set.member` xs then link else colouredName) ++
col (" ("++show entries ++")")]
where
link ="<a href='#"++show (hash name) ++"'>"++ colouredName ++"</a>"
colouredName = col name
col = colourText indent
spc =replicate (indent *2) ''colourText::Int->String->String
colourText 0 text = text
colourText i text ="<span style=\"color: "++ colour i ++"\">"++ text ++"</span>"colour::Int->String
colour = go . (`rem` noColours)
where
go 0=-- some CSS colour
go 1=-- some other CSS colour-- etc.
noColours =-- TBD
colourText 0 = id, so that top-level text will retain the default colour. I haven't tested this, but hopefully you get the idea.
I'd be happy to create a pull request, if you agree to this change. I'm not fussed about what the colours should be, although they should ideally be accessible to colourblind developers. Presumably there's an appropriate palette that I could use somewhere online.
Activity