Permalink
Please
sign in to comment.
Browse files
Disallow `(` and `)` characters in path
The original reason for permitting `(` and `)` in paths was due to
Dhall's origins as a fork of Morte/Annah. Morte had no built-in
operators and often imported them via the Prelude, like this:
http://sigil.place/prelude/annah/1.0/List/(++)
Morte also adopted the Haskell convention of using parentheses for
unapplied operators, so paths required parentheses.
However, this came at a price, which was really confusing parsing errors
if the user did something like this:
λ(x : ./type) → x
This is because the `./type)` would be parsed as a single path token and
then you'd get a downstream error due to a missing parenthesis.
Dhall, on the other hand, does not benefit much from parentheses in
paths. Dhall already has several built-in operators and doesn't support
operator names for bound variables. Therefore, this change eliminates
support for parentheses in paths to improve error messages and reduce
the need for explicit whitespace after paths.- Loading branch information...
0 comments on commit
dc1773f