ndmitchell/hoogle

Hoogle displays latex comments weirdly

fendor opened this issue · 3 comments

Apparently in the latest base, basic functions received big-O notation of their complexity: https://hackage.haskell.org/package/base-4.14.0.0/docs/Prelude.html#v:filter

This renders weirdly in hoogle:
hoogle_output

Thanks for the report. Whoever implemented this in Haddock decided the appropriate output for Hoogle was:

-- | <math>. Extract the elements after the head of a list, which
--   must be non-empty.
tail :: [a] -> [a]

It's not massively surprising that displays as <math> when rendered....

I have to say, the use of MathJax for displaying O(1) in a fancy font gives a significantly worse experience and load time than just putting it in italics, which is perfectly readable, massively simpler and doesn't load-flicker in. But I imagine someone added a fancy feature then wanted to show it off, so I can't see simplicity prevailing any time soon. I'll add a hack to drop a <math> prefix.

Hack added. It now makes tail look reasonable again.

thank you!