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 cli parsing #38

Merged
merged 3 commits into from
Jun 12, 2024
Merged

Conversation

andrevidela
Copy link
Contributor

@andrevidela andrevidela commented Jun 12, 2024

The documentation reads

--config  Preamble configuration file in Dhall format.

However, writing --config *config file* would break with an obscure error message.

This is because the filename would be passed as argument directly to the Dhall parser, rather than being read from the filesystem and be given to the dhall parser.

The reason it worked until now is because if you write ./filepath, dhall knows to interpret it as a file to read from the filesystem and will perform the file reading for us. If you write filepath the dhall parser will fail assuming that it is an unbound variable. This PR fixes this behaviour by reading the file before passing its content to the parser.

I also fixed some warnings due to conflicting fixity declarations.

@andrevidela andrevidela merged commit 7282c4c into idris-community:main Jun 12, 2024
1 check passed
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.

2 participants