Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation structure confusing #120

Open
DigitalBrains1 opened this issue Oct 3, 2024 · 0 comments
Open

Documentation structure confusing #120

DigitalBrains1 opened this issue Oct 3, 2024 · 0 comments

Comments

@DigitalBrains1
Copy link
Member

We use the following in clash-protocols.cabal:

  reexported-modules:
    Protocols.Plugin

The intent is to hide clash-protocols-base a bit more from the user. clash-protocols-base exposes that module, and clash-protocols merely reexports it. But this is not perfect.

  1. The generated Haddock for clash-protocols does not actually include the Haddock for that module. It merely links to the Haddock for clash-protocols-base. So much for hiding.

    Also, it confused me. I opened the contents for clash-protocols, clicked the Protocols.Plugin module, then clicked the Contents header of that page and suddenly I was in the contents for clash-protocols-base even though I could have sworn I was looking at the documentation for clash-protocols. (To continue the saga, I drew the incorrect conclusion I must have had opened the wrong tab in my browser, started looking for the proper tab which didn't exist, and so on...). All in all, I find this a weird UX.

  2. The Haddock for the Protocols module only documents the instances for Protocol that are defined in clash-protocols. The instances defined in clash-protocols-base are not listed. On the flip side, Protocols.Plugin only lists the instances for Protocols defined in clash-protocols-base (but that is pretty obvious as it doesn't know about clash-protocols).

  3. Points 1 and 2 combine to: if you open the Haddock for clash-protocols and go to Protocols.Plugin, it will tell you that you can get more tuple instances for Protocols if you define the flag -flarge-tuples. But you need to define that flag for the clash-protocols-base package as well as for the clash-protocols package if you want other classes to get the same (but see issue clash-protocols should not use Protocols.Plugin.Cpp #119).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant