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

Fix --version flag handling for dhall-json package #1199

Merged
merged 5 commits into from
Aug 6, 2019

Conversation

Gabriella439
Copy link
Collaborator

Fixes #1198

This changes version to be a separate constructor for options parsing,
in order to make invalid states unrepresentable and to fix issues like
the above one.

Fixes #1198

This changes version to be a separate constructor for options parsing,
in order to make invalid states unrepresentable and to fix issues like
the above one.
Gabriella439 and others added 2 commits August 3, 2019 16:58
This was a change I forgot to stash while working on the fix for the
`--version` flag

case maybeOptions of
Nothing -> do
putStrLn (Data.Version.showVersion Meta.version)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having Nothing represent the --version option seems a bit hacky. Why not use the same schema as in dhall-to-json?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sjakobi: It's because the option type for dhall-to-yaml it defined in a separate file and it doesn't have a Version constructor. I plan to fix that, but I wanted to keep this change as small as possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

yaml-to-dhall --version should not require SCHEMA argument
2 participants