Open ekmett opened 9 years ago
Seems related to https://github.com/haskell/haddock/issues/211 . If GHC spits that information out then maybe we can do something with it but it's not exactly high priority.
I mostly just figured I'd post it out here from the GHC Trac so it didn't get lost. Even if the decision is to just actively punt on the concern and leave this open to track it, I'm okay with that.
I don't want to leave tickets without clear way to progress hanging open. I don't want to shoot the idea down without experimenting first but if I find it's not practical and/or noone cares strongly for it, I'll just close as WONTFIX. Not any time soon anyway. Thanks for opening the ticket!
This can be fixed with Hi Haddock (and possibly before that, but I don't care to follow that path), and without GHC-side changes! The catch is that is does mean hard coding in Haddock's source which modules export which special things. That seems like a reasonable price to pay though...
Seems acceptable.
I'll be preparing a patch for this shortly. Regarding which special things we'd like to have exported, I'm currently assuming we want:
GHC.Prim
to export (->)
(morally it should, since its interface does)GHC.Types
to export []([], (:))
and (~)
(as per the comments in its export list)Prelude
to export []([], (:))
and (->)
(I think these will be nice for the sake of seeing their instances)Data.Tuple
to export boxed tuples of arity 0 to 15 (I'm capping at 15 since that's what the report gives)Any other requests (preferably for modules whose names are in PrelNames
- so not Data.List
)?
From trac:
The documentation for base does not include tuples, lists or arrow. I realise these are special in Haskell, but it seems a shame they aren't documented. For tuples, the documentation for base doesn't include them in either Prelude or Data.Tuple, but the documentation for ghc-prim includes them in GHC.Unit and GHC.Tuple. I think the lack of documentation for tuple types is a bug, since it would be relatively easy for them to be documented, and does make the documentation more complete. For lists ([], (:)), there is no documentation in either base or ghc-prim. It would be nice if they were documented in Prelude and Data.List, but not if it was too much effort (I can imagine that Haddock can't accept list definitions). For the arrow type ->, it's unclear if it can reasonably be documented, so it might be worth thinking about but probably not bothering to document. The reason I'm interested in ensuring complete documentation is that Hoogle currently doesn't know about tuple constructors in the base library, but it does know about them in ghc-prim, which seems wrong.
https://ghc.haskell.org/trac/ghc/ticket/4861