[Haskell-cafe] Reading Haddock sources on hackage no longer possible with simple browsers?

Alec Theriault alec.theriault at gmail.com
Sat Nov 14 18:16:24 UTC 2020


Hello,

This is indeed by design - it is a relatively new Haddock feature (here’s the original issue <https://github.com/haskell/haddock/issues/715>) where types of identifiers and identifiers bound are shown on mouse-over.
Here is what this looks like in a graphical browser:



As for the the weird declarations like $cshowList and company, this seems to be a bug - Haddock should not display those identifiers.

Although I’m sympathetic to the accessibility, in this case wouldn’t just directly opening the sources (in a text editor) be simpler? Is there a (simple) way to preserve the experience when browsing using Lynx without also holding back features aimed at a regular browsing experience?

Alec

> On Nov 14, 2020, at 1:01 PM, Johannes Waldmann <johannes.waldmann at htwk-leipzig.de> wrote:
> 
>> I recently noticed that it is no longer possible
>> to read the source of a module, because extra type information
>> (which is likely hidden in a modern browser)
>> is inline with the actual sources.
> 
> I confirmed your example, reading with lynx and w3m.
> 
> It seems the extra text
> is the methods of the type classes (mentioned after "deriving")
> and it gets shown on on mouse-over in a graphical browser.
> 
> (Re: "nobody writes code like this" - the compiler does?
> Some methods here seem auto-generated.)
> 
> Looks like a bug in haddock, then? (Or in lynx' handling of CSS?)
> The actual HTML source looks legit, at least partially
> (see example below)
> 
> This seems related:
> https://github.com/haskell/haddock/pull/1197
> 
> I will open an issue on accessibility.
> 
> - J.W.
> 
> <span class="hs-keyword">deriving</span><span> </span><span
> class="hs-special">(</span><span id="local-6989586621679046279"><span
> id="local-6989586621679046281"><span
> id="local-6989586621679046283"><span class="annot"><span
> class="annottext">Int -> ISBN -> ShowS
> [ISBN] -> ShowS
> ISBN -> String
> (Int -> ISBN -> ShowS)
> -> (ISBN -> String) -> ([ISBN] -> ShowS) -> Show ISBN
> forall a.
> (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS)
> -> Show a
> showList :: [ISBN] -> ShowS
> $cshowList :: [ISBN] -> ShowS
> show :: ISBN -> String
> $cshow :: ISBN -> String
> showsPrec :: Int -> ISBN -> ShowS
> $cshowsPrec :: Int -> ISBN -> ShowS
> </span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var
> hs-var hs-var hs-var">Show</span>
> 
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20201114/eeabff5d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2020-11-14 at 1.04.17 PM.png
Type: image/png
Size: 198462 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20201114/eeabff5d/attachment-0001.png>


More information about the Haskell-Cafe mailing list