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

Add --file flag #949

Merged
merged 3 commits into from
May 13, 2019
Merged

Add --file flag #949

merged 3 commits into from
May 13, 2019

Conversation

Gabriella439
Copy link
Collaborator

This allows users to supply the Dhall expression by path instead of via
standard input. This also ensures that transitive imports are resolved
appropriately relative to the file's path.

In other words, instead of this:

$ dhall <<< './foo/bar.dhall'

Users can now do:

$ dhall --file foo/bar.dhall

This allows users to supply the Dhall expression by path instead of via
standard input.  This also ensures that transitive imports are resolved
appropriately relative to the file's path.

In other words, instead of this:

```
$ dhall <<< './foo/bar.dhall'
```

Users can now do:

```
$ dhall --file foo/bar.dhall
```
@ocharles
Copy link
Member

ocharles commented May 13, 2019 via email

@Gabriella439
Copy link
Collaborator Author

@ocharles: The main reason I wasn't sure about using a positional argument is because I thought we might want to leave the door open for a parallel --expression flag for supplying the expression via the command line instead of standard input.

However, I can definitely add support for the idiom of - meaning STDIN

@Gabriella439 Gabriella439 merged commit 20f6d8c into master May 13, 2019
@Gabriella439 Gabriella439 deleted the gabriel/file_flag branch May 13, 2019 16:26
quasicomputational added a commit to quasicomputational/dhall-haskell that referenced this pull request May 22, 2019
Seems that Main.Default changed in dhall-lang#949, but this use-site wasn't
changed at the same time.
Gabriella439 pushed a commit that referenced this pull request May 23, 2019
Seems that Main.Default changed in #949, but this use-site wasn't
changed at the same time.
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.

None yet

2 participants