-
Notifications
You must be signed in to change notification settings - Fork 214
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
Should the default dhall
command emit the type to stderr
?
#539
Comments
I think we should never abuse If a user wants to prevent having to call the interpreter twice, there’s other methods, like having a |
I find the current behaviour inconvenient as I'm calling |
I vote for option one (no types on stderr). What if some option like @Profpatsch suggests outputs the normalized form with an explicit type annotation, so that the stdout is still valid Dhall? |
Alright, then we'll go with no types on |
@Gabriel439 I'd +1 as well on the |
I really like @sellout's suggestion of including the type annotation in |
I think I'll tentatively go with omitting the type annotation by default and allowing the user to opt in using an |
Fixes #539 The default `dhall` command no longer outputs types to `stderr`. Instead, the user can opt into a type annotation using a newly added `--annotation` switch.
Fixes #539 The default `dhall` command no longer outputs types to `stderr`. Instead, the user can opt into a type annotation using a newly added `--annotation` switch.
One issue that I've begun to run into recently is the fact that the default
dhall
command (i.e. no subcommand) reservesstderr
for printing the inferred type of the expression. This prevents the executable from emitting useful information tostderr
for successful runs.For example, the next release of the standard will say:
The natural place to put that warning would be
stderr
but that would cause issues for people expectingstderr
to contain the type.Similarly, at some point we might want to provide download progress indicators for remote imports and the natural place for that would also be
stderr
.Currently, users can use the
dhall type
subcommand to programmatically retrieve the inferred type of an expression, so there is less of a need to include the inferred type in the default command's output.So I'm going to propose a few solutions to this problem so that we can include useful diagnostic information in
stderr
:stderr
entirely for the default command (i.e. reservestderr
exclusively for debug output and reservedhall type
as the exclusive way to infer the type)stderr
so that one can still capturestderr
as a valid Dhall typestderr
still reflects a valid type if there is debug outputMy inclination is for the second option (comment out debug output), but I'm open to other ideas
The text was updated successfully, but these errors were encountered: