-
Notifications
You must be signed in to change notification settings - Fork 4
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
A functional version of withShownDefault #16
Comments
I think I prefer your version and we should do that, name it |
Awesome, should I also change |
Yes please. |
Opened as #17. |
Merged manually and released. |
I have a custom type for bytes that I use as an option with a better syntax: something like
"128m"
->Bytes 128 $ Just M
.withShownDefault
is perfect for gettingdefault: 128m
to appear in the documentation, but its ergonomics were not what I expected. Ultimately, I had to write:I have to specify the default value twice, which could lead to bugs. I know I could extract with
let
orwhere
, of course, but that's not always convenient.When I first saw
withShownDefault
I assumed it would work like this:Then I could simply do,
I'm interested in adding a function that works this way, but with the name
withShownDefault
taken, I'm not sure what to call it.?
The text was updated successfully, but these errors were encountered: