-
Notifications
You must be signed in to change notification settings - Fork 217
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 support for Unix shebangs #2175
Conversation
… as standardized in dhall-lang/dhall-lang#1158
@@ -757,7 +766,7 @@ parsers embedded = Parsers {..} | |||
where | |||
predicate c = c == '$' || c == '\'' | |||
|
|||
endOfLine = do | |||
endOfLine_ = do | |||
a <- "\n" <|> "\r\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could this be replaced by a <- endOfLine
?
It would be nice to support multiple lines of I have just tested this branch with the following (from the root of the #! /usr/bin/env nix-shell
#! nix-shell -i "dhall --file" -p "(import ./.).dhall"
42 Which currently gives me: ➜ ./test.dhall
dhall:
Error: Invalid input
./test.dhall:2:1:
|
2 | #! nix-shell -i "dhall --file" -p "(import ./.).dhall"
| ^^^^^^^^
unexpected "#! nix-s"
expecting expression or whitespace I saw the |
@basile-henry: Yeah, that would first require an upstream change to the standard, which we can still do afterwards |
It seems like Alternatively, perhaps nix-shell could be modified to also consider |
Also it is unfortunate that |
That's probably true for |
|
… as standardized in dhall-lang/dhall-lang#1158