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

Import resolution is disabled #641

Closed
Michael-Kateregga opened this issue Oct 16, 2018 · 7 comments
Closed

Import resolution is disabled #641

Michael-Kateregga opened this issue Oct 16, 2018 · 7 comments

Comments

@Michael-Kateregga
Copy link

I wonder why I keep on getting "Import resolution is disabled" when I use dhall's compiler - dhall type. Does anyone know how I can fix this?

@Gabriella439
Copy link
Collaborator

@Michael-Kateregga: This is intentional. Dhall has three phases for the interpreter:

  • Import resolution (implemented by dhall resolve)
  • Type-checking (implemented by dhall type)
  • Normalization (implemented by dhall normalize)

Each phase implements one step exclusively. So, for example, dhall type does not do import resolution. You would need to chain it downstream of dhall resolve, like this:

$ cat someFile.dhall | dhall resolve | dhall type

However, you might also just need to use the --annotate flag for the normal dhall command, or the :type command in the dhall repl

@Michael-Kateregga
Copy link
Author

Thanks @Gabriel439 :type or :t is great. I don't know it works in the same way as Haskell!

@Michael-Kateregga
Copy link
Author

Michael-Kateregga commented Oct 16, 2018 via email

@Gabriella439
Copy link
Collaborator

@Michael-Kateregga: I don't have anything to specific to add, other than to mention that you can use the dhall tag on Stack Overflow if you need any help with the design. I subscribe to that tag, so I get e-mail notifications for any new questions.

@Michael-Kateregga
Copy link
Author

@Gabriel439 done, thanks!

@Gabriella439
Copy link
Collaborator

You're welcome! 🙂

@ocharles
Copy link
Member

This particular issue seems resolved so I'm closing this. Please shout if I shouldn't have closed this!

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

No branches or pull requests

3 participants