-
Notifications
You must be signed in to change notification settings - Fork 113
Merge Prelude & Nix.Utils #985
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It is used in ~50% of modules & looks a standard feature at this point.
This allows to achieve Zen of Text<->String & Path<->FilePath. Set of functions for Text & Path now can be formed & exported.
695c686 to
21ac119
Compare
This explicitly states the code smell of String use left.
21ac119 to
49d91c7
Compare
After making this flexible prelude setup, we are moving the custom code back into Nix.Utils, so the downstream projects do not have trouble importing Prelude module, but just use regular Nix.Utils module.
Collaborator
Author
|
Now we have both the most flexible |
Moved function got some alteration. Reduced Lazy -> Strict marchalling. Also instead of Lazy used Strict data types, since on the conveyor that data seems to be consumed fully (which I may be wrong about).
33fd571 to
0071387
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We essentially had 2 preludes, now they are merged & allow to control what parts of
reludeare exposed.It clean-up imports quite a bit & provides a set of frequently used functions.
reludeis a pretty good prelude, but it still has flaws (for example it exposes a mix ofText&Stringfunctions, which is weird from the outside). If we want to useTextinternally - that should be it, conversion can still be needed (forbase^ GHC reasons), but at least is would be only on the IO margins (which arepreludefunctions), not 2 conversions in the middle of data flow.This setup helps to program with supplying
Texttype functions & support of stronger types.There may be a specific thing - currently, it is probably tricky to import our
Preludemodule into other projects, that can be addressed by moving stuff back intoNix.Utils& passing it throughPreludemodule, but then people would start importingNix.Utilsfrom time to time in the code base, which is Ok, since because ofPreludepassthrough - that would be rare.I needed to do this sort of merge, to align all code & project this way properly, before I do further things with it.
This is the last thing I had in mind, I plan to stop refactors any moment if #804 ever continues.