Repository navigation
Add --quiet option for dhall decode - #1803
Merged
Merged
Conversation
This is intended primarily for investigating decoding performance.
Collaborator
Author
|
Sample measurement from my machine: So 11.8 MB/s. |
german1608
reviewed
May 21, 2020
Comment on lines
+825
to
+831
| if quiet | ||
| then return () | ||
| else do | ||
| let doc = | ||
| Dhall.Pretty.prettyCharacterSet | ||
| characterSet | ||
| (Dhall.Core.renote expression :: Expr Src Import) |
Collaborator
There was a problem hiding this comment.
(style comment) use unless (from Control.Monad):
Suggested change
| if quiet | |
| then return () | |
| else do | |
| let doc = | |
| Dhall.Pretty.prettyCharacterSet | |
| characterSet | |
| (Dhall.Core.renote expression :: Expr Src Import) | |
| unless quiet $ do | |
| let doc = | |
| Dhall.Pretty.prettyCharacterSet | |
| characterSet | |
| (Dhall.Core.renote expression :: Expr Src Import) |
Collaborator
Author
There was a problem hiding this comment.
Yeah. When I started contributing to dhall, I often wanted to use unless and similar utils too, but realized that Gabriel mostly sticks to if. These days, I find this if-style actually more readable than the implicit negation of unless.
german1608
approved these changes
May 21, 2020
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
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.
This is intended primarily for investigating decoding performance.