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

Make format and dhall subcommands of dhall executable #452

Merged
merged 6 commits into from Jun 10, 2018

Conversation

gilligan
Copy link
Collaborator

I really just moved code around a bit - fixes #436

I just realized that Tutorial.hs also has to be adjusted since it is using dhall-format and dhall-hash. Another thing is with --inplace now being a global switch. Is that Ok @Gabriel439 or should that rather be moved down to be a switch to the format subcommand?

@gilligan
Copy link
Collaborator Author

Oops, just saw the upstream changes and fixing..

@@ -65,6 +68,13 @@ parseOptions = Options <$> parseMode <*> parseExplain <*> parsePlain
<> Options.Applicative.help "Disable syntax highlighting"
)

parseInplace =
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, I think this should be a format-specific option (See #451 for an example of how to do that)

Note that it's still worth keeping the intermediate parseInplace utility as I imagine that other utilities might reuse it in the future (like the dhall freeze command described in #437)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👌

@gilligan
Copy link
Collaborator Author

@Gabriel439 i also updated Tutorial.hs, let me know if that works for you.

@Fingerzam I suppose your PR was actually ready before mine. I somehow missed it. Sorry. I actually took the format subcommand code from you now but I moved hash and format to their own modules..

@Gabriella439
Copy link
Collaborator

As I mentioned in #436 I have decided to merge this pull request. Thanks to both of you, though, for taking the time to do this 🙂

@Gabriella439 Gabriella439 merged commit 6029f25 into dhall-lang:master Jun 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make dhall-format and dhall-hash subcommands instead of standalone executables
2 participants