Implemented handling of preprocessor conditional pragmas
The preprocessor directives #if, #ifdef, #else, #endif are widely used as a tool for keeping backward compatibility in haskell packages. They are used in 5-10% of all packages registered on stackage. Although we don't encourage preprocessor usage in haskell source code, we decided that we have to create some kind of support for a restricted set of preprocessor pragmas.
From now, conditional preprocessor pragmas are supported for Haskell-tools. These pragmas are kept even if their related elements are removed. Currently the new pragma-keeping methods are used only in Organize imports (as imports are very likely to be conditionally enabled), but later we will ensure the preprocessor-compatibility for other refactorings.
Enhancements for Rename refactoring
The rename definition refactoring have been updated, now it can rename module aliases (as ... modifiers in imports).
So, for example, in import Data.List as LL, you can rename LL, and all qualified names that contain LL will be also renamed.
Checks on scoping rules have been also revised for safer refactoring.