-
Notifications
You must be signed in to change notification settings - Fork 114
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
Parser: work on NAppDef & OperatorInfo related code #1047
Parser: work on NAppDef & OperatorInfo related code #1047
Conversation
Thoughts during this PR:
Because grammar now is better formulated & becomes more obvious.
I would like to have & use a better map of Also the I'd liked there to be the only datatype & data structure of the language operator grammar ( (also do not know the current state of performance of GADTs in GHC.) I think maybe the use of patterns (or functions) on |
The proper solution is probably to have one value that represents the language grammar. And then have a set of functions that on And then on top of that build |
d842a6c
to
d7d507d
Compare
M src/Nix/Value/Equal.hs
Allows not applying `void` externally.
Ordering in the cardinality/use.
1139aa8
to
0edf6d7
Compare
clean-up `nixOperators` table.
Well. The work is mostly done. The main side-effect of working on The funny thing is that now I arrived basically to The next question is: |
Why stop using |
So people would learn to work/read with default Haskell functions
The combinatorial explosion creates a combinatorial explosion of knowledge requirement & mapping between those names & cognitive effort to process it. Even writing rewriting rules for them requires Either grow combinatorial explosion exponentially, through composition lattice, OR just to do unification rewriting to default names & have standard consice rewriting lattice. HLint has no equality intuition between aliases, and so, in long term - HLint would help only if default lattice rules match. For example And rewriting is mostly what I did up to this point here. I myself forget that the default name is Then learn all old & new intuitions & lattices. For new functional programmers & Haskellers it would be easier to learn the default Above rationalizations I apply to And I do such renames to form and stabilize style in the project. As a result, style does not needs to be managed in the project at all. It allows to me to accept and be happy to take in work done in any style, I do not require adopting the style by other people, in reviews - for me the improvements are important. I can relax the review constraints & concentrate on improvements, because project code itself passively and politely nudges contributors towards a particular style if they can be nudged, but if they decided to contribute in their own style - I do know they decided so, for me that is enough to justify them contributing in their own style. I can obtain a bus factor myself & code form itself would teach people this style and show it is possible & works great, and without me would provide style maintenance passively continuously and would make people consider this design style for this project, and their own style and so for other projects for a number of years. But it also may be true I went a bit far with essentially redefining the prelude for the project. But most of these changes are probably sane to expect from the next default Prelude, or contribute suggestions into it. I also promised to move to the new default Prelude when it would be released.
Because I constantly need to remember how to read I also met & read other people noting that they have difficulty reading It is also why I aliased The additional question is why All these style changes I did so far seem to align the code representation with the internal partial application sharing process (first default case, then general case), which seems to align with use of eliminators & control flow in Haskell. Of course control flow in I am happy to have a dialog on any point or get additional reasoning points into a dialog. |
I also currently get to have thoughts about |
Stramgely, profiling shown that in this bool a pretty big part of time was spent.
Thank you @Anton-Latukha for the detailed explanation. Haskell does suffer the fact that a lot of function names points to the same or similar functionality. For me, I do not have a strong opinion upon these changes.
But overall, I suppose it is indeed a good idea to stick to a style. |
Yes. But that the source character size of arguments is different - is not an argument to suddenly introduce a 2nd function to do the same thing.
For me this Haskell design requires Either being Ok with reading the large section, OR - if not Ok with having that section - formalizing the semantics of the section using denotation abstraction (a fancy way of saying - that should be a nicely named local function). For me that, the function sectioning in the middle makes the code feels awkward to do - is a feature, it indicates that that section is above the Fairbairn threshold & so design nudges toward naming that code part properly & so as a result having more readable & understandable code through composition. While In both cases - ( Indeed, sometimes I section things and like: "ugh, how to name this" - that is the intended property of the design. At the same time, With the ability to be composed, and being the default name - HLint would pick up the rewriting simplifications for it if they would occur. While initially learning Haskell I found the When I arrived at HNix, here was a number of |
No description provided.