-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add universum-prelude
#242
base: master
Are you sure you want to change the base?
Conversation
prelude/LICENSE
Outdated
@@ -0,0 +1,20 @@ | |||
The MIT License (MIT) | |||
Copyright (c) 2016-2017, Stephen Diehl, 2017, Serokell |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIU it's a completely new package, we can treat it as completely new work that started in 2021. Moreover, I am not sure if we should use MIT here (for consistency with universum
itself) or MPL-2.0 (which is our default choice for such things). Both are fine to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, somehow missed that the license file can include year/authors too.
Hope for such a small package it does not really matter which license to choose.
|
||
Add a dependency on `universum-prelude` that provides `Prelude` with all the `universum` functionality. | ||
|
||
Also, replace `base` dependency with `base-noprelude` to avoid conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, it's completely unfair not to mention the mixin
approach. Yes, it breaks some tools and for many people it's a critical downside, but apart from that it sounds like the cleanest solution which one should prefer if they don't care about broken tools.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, I completely forgot that this is also an option and worth enlisting here.
7d6e652
to
551c597
Compare
Problem: in some projects, like `xrefcheck`, we would like to use `universum` without constant explicit `import Universum`. Solution: add a dedicated package that allows doing so. One another way is using mixins feature, but it does not yet work really well (`stack ghci` tends to fail, as well as Haskell language server), so we better look at this feature again at its better times.
551c597
to
1d1347d
Compare
I think this can be merged, right? |
I failed to test the new |
Description
Add an easy way to implicitly import
Universum
in other projects.I'm yet about to test it. Unfortunately, the maintainer of base-noprelude is away for some time already, and
base-noprelude
is now too outdated to be used in any of our projects, see haskell-hvr/base-noprelude#11.I didn't update cI workflows, since
stack build
already covers the new module, and the new package is too small to test it with cabal too.Related issues(s)
✓ Checklist for your Pull Request
Ideally a PR has all of the checkmarks set.
If something in this list is irrelevant to your PR, you should still set this
checkmark indicating that you are sure it is dealt with (be that by irrelevance).
are inextricably linked. Otherwise I should open multiple PR's.
reference this issue. See also auto linking on
github.
Related changes (conditional)
Tests
silently reappearing again.
Documentation
I checked whether I should update the docs and did so if necessary:
Record your changes
and
Stylistic guide (mandatory)
My commit history is clean (only contains changes relating to my
issue/pull request and no reverted-my-earlier-commit changes) and commit
messages start with identifiers of related issues in square brackets.
Example:
[#42] Short commit description
If necessary both of these can be achieved even after the commits have been
made/pushed using rebase and squash.