Closed
Description
It is legal in Haskell to write an import list like this:
import Foo
( a,
b,
c,
)
Note the trailing comma. In particular, Ormolu formats files this way. However, if I have an import list formatted this way, and ask HLS to add an import (for example, from the quick-actions list, or otherwise auto-importing something), I get this
import Foo
( a,
b,
c,, newImport
)
Note the double comma at the end. Of course, this is a syntax error.