hls-4

HLS can suggest import of modules for the user. These generated imports can be placed incorrect, as it may be inserted before the 'where' of a module declaration, resulting in an invalid file. This has been addressed by rewriting the import-placement.

ghc-version: 8.10.7

hasbugs-version: 1.0.0

license: Apache-2.0

build-framework: stack

Repository
GitHub Artifacts :

Faults @cdc8f78a

[
  {
    "endline": 1392,
    "file": "ghcide/src/Development/IDE/Plugin/CodeAction.hs",
    "function": "newImportInsertRange",
    "module": "Development.IDE.Plugin.CodeAction",
    "startline": 1391
  },
  {
    "endline": 1403,
    "file": "ghcide/src/Development/IDE/Plugin/CodeAction.hs",
    "function": "findPositionNoImports",
    "module": "Development.IDE.Plugin.CodeAction",
    "startline": 1397
  }
]

Fixes @0b8c793d

[
  {
    "endline": 1419,
    "file": "ghcide/src/Development/IDE/Plugin/CodeAction.hs",
    "function": "newImportInsertRange",
    "module": "Development.IDE.Plugin.CodeAction",
    "startline": 1412
  },
  {
    "endline": 1428,
    "file": "ghcide/src/Development/IDE/Plugin/CodeAction.hs",
    "function": "findPositionNoImports",
    "module": "Development.IDE.Plugin.CodeAction",
    "startline": 1424
  },
  {
    "endline": 1494,
    "file": "ghcide/src/Development/IDE/Plugin/CodeAction.hs",
    "function": "findPositionAfterModuleName",
    "module": "Development.IDE.Plugin.CodeAction",
    "startline": 1430
  }
]