haskell-graphql / graphql-api

Write type-safe GraphQL services in Haskell
BSD 3-Clause "New" or "Revised" License
406 stars 35 forks source link

Clarify exports #166

Open jml opened 6 years ago

jml commented 6 years ago

Filing as separate bug to avoid scope creep in #99.

Goal is that the public modules should be self-complete. Everything that appears in a type signature in the public modules should be exported from one of the public modules.

This means that users should not have to import internal modules to write type signatures, nor run into things like #165.

Probably don't work on this until #99 is done, as that will make the distinction between internal & external much more clear.

Here's stuff in our public modules that appear in type signatures etc. but are not exported anywhere:

In addition, here's what's in our public modules that must be imported from internal modules:

Here's stuff in our internal modules that's in type sigs but not exported:

(This is from mucking around with Haddock. I wish there were a better way.)

theobat commented 6 years ago

Can I help with this ? Has anything been done in the list already ?

jml commented 6 years ago

Please go ahead!

I might have done some things on the list: I've forgotten.

The goal is that if something appears on a non-internal module in haddock, then clicking the link should stay non-internal.

Likewise, if something appears in a type signature, it should be exported.

I've found the easiest way to analyze this is to run haddock and look at the output manually. Really there should be a linter tool for it.