Skip to content

Expose LookupContext#78

Open
clintonmead wants to merge 1 commit into
haskell-servant:masterfrom
clintonmead:master
Open

Expose LookupContext#78
clintonmead wants to merge 1 commit into
haskell-servant:masterfrom
clintonmead:master

Conversation

@clintonmead

Copy link
Copy Markdown

I needed to refer to LookupContext by name in the constraints for a HasServer instance, and found I couldn't because it's not exposed.

So what I've done in this library to avoid changing the exports of the main library is:

  1. Create a new internal library Servant.Multipart.Internal
  2. Export LookupContext there.
  3. Import Servant.Multipart.Internal into Servant.Multipart but don't export it.

Alternatively, if you were happy just to add LookupContext to the export list of Servant.Multipart that would remove the need for this PR. Whatever you prefer.

This is because it's exposed as part of the `HasServer` instance of `MultipartForm'`, but annoyingly one can't refer to it outside the module.

To avoid adding this export to `Servant.Multipart`, I've instead created 1Servant.Multipart.Internal` and exposed it there.
@clintonmead

Copy link
Copy Markdown
Author

Oh I've just realised that there's still open PRs for this here and here

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

Successfully merging this pull request may close these issues.

2 participants