Closed cdsmith closed 2 years ago
I bet this is related to https://github.com/haskell/haskell-language-server/issues/2399, in that something is not using exactprint. If we're using exactprint I wouldn't expect this kind of bug.
I'm going to take a look at this.
It is legal in Haskell to write an import list like this:
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
Note the double comma at the end. Of course, this is a syntax error.