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

unflip {mkNixDoc, nvSet{,'}}; refactors #878

Merged
merged 45 commits into from
Mar 11, 2021
Merged

Conversation

Anton-Latukha
Copy link
Collaborator

No description provided.

@Anton-Latukha Anton-Latukha force-pushed the 2021-03-08-upd-value branch from a960809 to b7acde7 Compare March 8, 2021 16:04
@Anton-Latukha Anton-Latukha force-pushed the 2021-03-08-upd-value branch from a2c7782 to 2bd9a15 Compare March 8, 2021 20:56
@Anton-Latukha Anton-Latukha force-pushed the 2021-03-08-upd-value branch from 2bd9a15 to 2c3caf4 Compare March 8, 2021 20:57
@Anton-Latukha Anton-Latukha changed the title unflip {mkNixDoc, nvSet{,'}}; Exec: refactor unflip {mkNixDoc, nvSet{,'}}; refactors Mar 8, 2021
src/Nix/Eval.hs Show resolved Hide resolved
Foreign module functions which are text literals...

Lets stop spawning a String to serialize it into Text, which then serializes
into String that serializes then into Doc. If I would compute O to it - it would
explain the snails speed.
@Anton-Latukha Anton-Latukha merged commit 2555ffe into master Mar 11, 2021
@Anton-Latukha Anton-Latukha deleted the 2021-03-08-upd-value branch March 11, 2021 00:20
@expipiplus1
Copy link
Collaborator

hahah, wtf is this:

 annotateLocation :: Parser a -> Parser (Ann SrcSpan a)
-annotateLocation p = do
-  begin <- getSourcePos
-  res   <- p
-  end   <- get -- The state set before the last whitespace
-  pure $ Ann (SrcSpan begin end) res
+annotateLocation p =
+  do
+    begin <- getSourcePos
+    end   <- get -- The state set before the last whitespace
+
+    Ann (SrcSpan begin end) <$> p

This completely breaks location annotations! Guess that's my fault for not having any tests for them!

@Anton-Latukha
Copy link
Collaborator Author

The continuation is in #936.

Indeed was guilty of it.

@expipiplus1
Copy link
Collaborator

expipiplus1 commented May 23, 2021 via email

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