-
Notifications
You must be signed in to change notification settings - Fork 220
Closed
Description
The command dhall format removes backquotes when it thinks backquotes are unnecessary. But when backquotes are used for builtin labels like Some and Type, sometimes removing the backquotes produces incorrect code.
Minimal example:
let T = < Some | Type >
let t : T = T.`Some`
let x : T = T.`Type`
in TrueSave this file as test.dhall.
$ dhall --file test.dhall
True
$ dhall format test.dhall
$ dhall --file test.dhall
dhall:
Error: Invalid input
test_formatter.dhall:5:8:
|
5 | = T.Some
| ^^The file after formatting looks like this:
let T = < Some | Type >
let t
: T
= T.Some
let x
: T
= T.Type
in TrueThe backquotes in Some and Type have been removed. This produces incorrect code that does not parse.
Expected behavior: Quotes should not be removed with Some. (It's fine to remove them for Type though.)
Metadata
Metadata
Assignees
Labels
No labels