haddock
                                
                                 haddock copied to clipboard
                                
                                    haddock copied to clipboard
                            
                            
                            
                        Haddock doesn't include selectors from record pattern synonyms
The module
{-# language PatternSynonyms #-}
module Lib where
pattern P{x, y} = (x, y)
has the following exports:
λ :browse Lib
pattern P :: a -> b -> (a, b)
x :: (a, b) -> a
y :: (a, b) -> b
But Haddock doesn't show x and y:

Oops. Seems like this is already fixed in the wip/hi-haddock tree: :)

What this doesn't reveal though, is that x and y can be used in the pattern:
λ P {x = 1, y = 2}
(1,2)
Even ghci's :browse does a pretty terrible job of presenting the information. We need some nice output presentation that
- supports record selectors, GADT and not GADT
- supports pattern synonym selectors
- supports partial exporting of selectors
Some updates:
- When the pattern synonym is exported bundled with its parent type, its field selectors are completely missing from Haddock. They're only visible if exported separately.
- This is still around, and affects https://hackage.haskell.org/package/snumber-0.1.0.0/docs/Data-SNumber.html, where the exported unSNumberis missing.