-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
Issues using List/map + dhall-format #59
Comments
I believe Dhall's parser used to support this in older versions but doesn't any longer once I standardized the grammar. Like you noticed, Normally you would fix this using a lexer with a longest-match rule, but the Dhall language cannot support a separate lexing step because some language features fundamentally conflict with lexing (specifically: nested block comments and string interpolation). You can work around this by just prefixing the variable name with anything like |
Ah, thanks - that works. I was going off the examples at https://hackage.haskell.org/package/dhall-1.8.0/docs/Dhall-Tutorial.html#g:20, fyi. |
I'll reopen this just to remind myself to fix the tutorial examples |
Fixed by dhall-lang/dhall-haskell@834c1b6 |
The purpose of this change is to permit identifiers that begin with reserved keywords. Here are some example issues due to Dhall previously not supporting that: * dhall-lang/dhall-haskell#250 * #59 After this change, names like `List/map` or `TypeSynonym` would become legal. However, this should not break any existing code because variable names will still reject reserved identifiers.
It turns out that there might be a way to fix the original issue after all to support identifier names like |
Nice! |
The purpose of this change is to permit identifiers that begin with reserved keywords. Here are some example issues due to Dhall previously not supporting that: * dhall-lang/dhall-haskell#250 * #59 After this change, names like `List/map` or `TypeSynonym` would become legal. However, this should not break any existing code because variable names will still reject reserved identifiers.
Probably doing something stupid here, but given the following:
then
dhall-format
convertsList/map
on the last line toList /map
, and I getError: Missing file
.dhall-format
doesn't mungeList/head
in the same way, which is odd.If I disable
dhall-format
then I get the same error, though.Using dhall 1.8 from stackage nightly 2017-11-25, on MacOS.
The text was updated successfully, but these errors were encountered: