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

Why doesn't "dhall type" support imports? #1277

Closed
sjakobi opened this issue Sep 3, 2019 · 1 comment · Fixed by #1281
Closed

Why doesn't "dhall type" support imports? #1277

sjakobi opened this issue Sep 3, 2019 · 1 comment · Fixed by #1281

Comments

@sjakobi
Copy link
Collaborator

sjakobi commented Sep 3, 2019

Currently it outputs

Import resolution is disabled

when the given expression contains an import.

Is there a reason why it shouldn't try to resolve imports?

@sjakobi sjakobi transferred this issue from dhall-lang/dhall-lang Sep 3, 2019
@Gabriella439
Copy link
Collaborator

@sjakobi: No good reason. When I initially added the dhall {resolve,type,normalize} subcommands the rationale was that each would only execute one phase of the interpretation pipeline, but in retrospect I think it was a mistake and think that dhall type should resolve imports like you request

Gabriella439 added a commit that referenced this issue Sep 5, 2019
Fixes #1277

The original motivation was that `dhall type` would represent a
type-inference-only phase.  However, in practice that wasn't very useful
so `dhall type` now performs import resolution followed by type inference.
@mergify mergify bot closed this as completed in #1281 Sep 5, 2019
mergify bot pushed a commit that referenced this issue Sep 5, 2019
* Change `dhall type` to resolve imports

Fixes #1277

The original motivation was that `dhall type` would represent a
type-inference-only phase.  However, in practice that wasn't very useful
so `dhall type` now performs import resolution followed by type inference.

* Fix loading relative to root directory

... as caught by @sjakobi

Co-Authored-By: Simon Jakobi <simon.jakobi@gmail.com>
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 a pull request may close this issue.

2 participants