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.
[ { "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 } ]
[ { "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 } ]