haskell / haddock

Haskell Documentation Tool
www.haskell.org/haddock/
BSD 2-Clause "Simplified" License
362 stars 242 forks source link

A rendering issue of destructurs #1491

Open coot opened 2 years ago

coot commented 2 years ago

Current haddock head of ghc-9.2 branch (041385bc43f0b99d26077787eb8ed9e394766438) renders toLazyTMVar defined by:

newtype StrictTMVar m a = StrictTMVar { toLazyTMVar :: LazyTMVar m a }

as

<a id="v:-36-sel:toLazyTMVar:StrictTMVar" class="def">$sel:toLazyTMVar:StrictTMVar</a>

certainly the inner part of the link should just be toLazyTMVar

Kleidukos commented 2 years ago

The $sel is absolutely an abstraction leak, it's a sign that the code that the compiler had a record selector disambiguation extension activated.

coot commented 2 years ago

You're right it has DuplicateRecordFields turned on which implies DisambiguateRecordFields.