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

added TextBuilder alias #581

Merged
merged 3 commits into from
Apr 19, 2024
Merged

Conversation

BebeSparkelSparkel
Copy link
Contributor

No description provided.

@Bodigrim
Copy link
Contributor

Hmm, we have StrictBuilder already. Even while it's in an internal module and not widely advertised, it would be nice to come up with a consistent naming.

Should this one be LazyBuilder or LazyTextBuilder or TextLazyBuilder?.. @Lysxia what do you think?

@Lysxia
Copy link
Contributor

Lysxia commented Apr 14, 2024

I like LazyTextBuilder since there is also type LazyText, and so that leave room for TextBuilder as the new (and public) name for StrictBuilder.

@BebeSparkelSparkel
Copy link
Contributor Author

I have added StrictTextBuilder and LazyTextBuilder.

@Lysxia
Copy link
Contributor

Lysxia commented Apr 15, 2024

I forgot we're already exporting StrictBuilder. So LazyBuilder for symmetry, instead of adding another step of renaming. Sorry for the confusion.

@BebeSparkelSparkel
Copy link
Contributor Author

I can add LazyBuilder, but I want to have Text directly in the name with StrictTextBuilder and LazyTextBuilder to differentiate it from other builder types.

@Lysxia
Copy link
Contributor

Lysxia commented Apr 16, 2024

I want to have Text directly in the name with StrictTextBuilder and LazyTextBuilder to differentiate it from other builder types.

Wouldn't qualified imports let you disambiguate as well?

@BebeSparkelSparkel
Copy link
Contributor Author

I see many type TextBuilder aliases in packages so it seems that many people want to be able to disambiguate with the name.

https://github.com/search?q=%22type+TextBuilder%22+language%3AHaskell+&type=code

@Bodigrim
Copy link
Contributor

I forgot we're already exporting StrictBuilder. So LazyBuilder for symmetry, instead of adding another step of renaming. Sorry for the confusion.

We can go for StrictTextBuilder / LazyTextBuilder and deprecate the existing StrictBuilder name, I don't think there are any users at the moment.

@Bodigrim
Copy link
Contributor

That's fine by me, but let me defer the judgement to @Lysxia as an original author of StrictBuilder.

@Bodigrim Bodigrim merged commit 3f2a71b into haskell:master Apr 19, 2024
27 checks passed
@Bodigrim
Copy link
Contributor

Thanks!

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.

3 participants