RefactoringTools / HaRe

The Haskell Refactoring Tool
http://www.cs.kent.ac.uk/projects/refactor-fp/
Other
139 stars 32 forks source link

Fixed an issue in addImportDecl #58

Closed SAdams601 closed 7 years ago

SAdams601 commented 7 years ago

When adding an import that only imports some names e.g.

import Data.List (head) 

When calling addImportDecl hide will be false but idNames would be non-empty. The output includes two spaces between the module name and the list of imported identifiers e.g.

import Data.List  (head)

I check if the import is hidden and if it's not remove the annotation for the hiding keyword and the DP for the open parenthesis becomes (0,0).

SAdams601 commented 7 years ago

Also made it so that addImportDecl correctly handles qualified imports.

alanz commented 7 years ago

Sorry for the delay, been a busy week.