-
Notifications
You must be signed in to change notification settings - Fork 217
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 --quiet option for dhall decode #1803
Conversation
This is intended primarily for investigating decoding performance.
Sample measurement from my machine:
So 11.8 MB/s. |
if quiet | ||
then return () | ||
else do | ||
let doc = | ||
Dhall.Pretty.prettyCharacterSet | ||
characterSet | ||
(Dhall.Core.renote expression :: Expr Src Import) |
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.
(style comment) use unless
(from Control.Monad
):
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) |
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.
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
.
This is intended primarily for investigating decoding performance.