haskell / haddock

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

Documentation for base does not include special items #368

Open ekmett opened 9 years ago

ekmett commented 9 years ago

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

Fuuzetsu commented 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.

ekmett commented 9 years ago

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.

Fuuzetsu commented 9 years ago

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!

harpocrates commented 6 years ago

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...

screen shot 2018-09-17 at 2 18 12 pm
Fuuzetsu commented 6 years ago

Seems acceptable.

harpocrates commented 6 years ago

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:

Any other requests (preferably for modules whose names are in PrelNames - so not Data.List)?