dhall-lang / dhall-haskell

Maintainable configuration files
https://dhall-lang.org/
BSD 3-Clause "New" or "Revised" License
918 stars 214 forks source link

dhall format desugars record puns #1728

Closed ari-becker closed 4 years ago

ari-becker commented 4 years ago

In 1.31.0,

let Foo = { foo = "hi" } in { Foo }

dhall format adjusts this to:

let Foo = { foo = "hi" } in { Foo = Foo }

which, accordingly, causes dhall lint --check to fail when the pun syntax is used.

Gabriella439 commented 4 years ago

Fix is up here: https://github.com/dhall-lang/dhall-haskell/pull/1729

amesgen commented 4 years ago

What about record completions? prettyRecordEntry is different in prettyRecordLit and prettyCompletionLit.

Unformatted:

let T = { Type = { x : Text }, default = {=} } let x = "lul" in T::{ x }

Formatted:

let T = { Type = { x : Text }, default = {=} } let x = "lul" in T::{ x = x }
sjakobi commented 4 years ago

Good catch, @amesgen! :)

Would you be interested in fixing this in a PR?