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

Data.ByteString.Builder.Internal: export some data constructors #247

Closed
wants to merge 2 commits into from

Conversation

fumieval
Copy link
Contributor

@fumieval fumieval commented Jul 4, 2020

Fixes #51?

sjakobi
sjakobi previously approved these changes Jul 4, 2020
Copy link
Member

@sjakobi sjakobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM & many thanks, @fumieval! :)

@fumieval
Copy link
Contributor Author

fumieval commented Jul 4, 2020

Sorry, I was confused; #51 was actually about primMapListBounded, which is already exported in the current version. The haddock problem is addressed in #248

@Bodigrim
Copy link
Contributor

I would rather refrain from exposing more internals, unless there is a direct reason for.

@sjakobi
Copy link
Member

sjakobi commented Jul 13, 2020

I would rather refrain from exposing more internals, unless there is a direct reason for.

I generally don't mind exposing internals, but I think the question is what stability guarantees they are exposed with (#253).

In the case of these constructors I in fact don't see a strong motivation to expose them:

  • BuildStep is actually just a type synonym – the added (..) doesn't change anything
  • To destructure Builder, users can rely on runBuilderWith. To construct a Builder, they can use builder.
  • For Put we offer put and runPut.

So maybe we should try making progress with #253 before we expose the Builder and Put constructors.

@hsyl20 What do you think?


@fumieval The documentation fixes in 61442d3 are definitely welcome though! Would you mind putting these up in a separate PR? :)

@sjakobi sjakobi dismissed their stale review July 13, 2020 14:00

Exposing internals needs more discussion and better motivation

@fumieval
Copy link
Contributor Author

I moved the documentation fix into #248 while it's open.

BuildStep(..) was my oversight; I actually meant BuildSignal. I wanted to use the data constructors when creating a custom consumer of Builder, but since there's fillWithBuildStep it is not necessary. I'm happy to close this.

@fumieval fumieval closed this Jul 13, 2020
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.

Builder internals are not exposed
3 participants