Safe Haskell | None |
---|
- cleanImports :: MonadClean m => [FilePath] -> m [ModuleResult]
- cleanResults :: MonadClean m => [ModuleResult] -> m [ModuleResult]
Documentation
cleanImports :: MonadClean m => [FilePath] -> m [ModuleResult]Source
Clean up the imports of a source file. This means:
- All import lines get an explict list of symbols
- Imports of unused symbols are removed
- Imports of modules whose symbol list becomse empty are
removed, unless the
removeEmptyImports
flag is set toFalse
. However, imports that started out with an empty import list()
are retained - Repeated imports are merged
- Imports are alphabetized by module name
- Imported symbols are alphabetized by symbol name
- Imported constructors and field accessors are alphabetized
cleanResults :: MonadClean m => [ModuleResult] -> m [ModuleResult]Source
Do import cleaning in response to the values returned by the split and merge operations. Module import lists are cleaned if the module is modified or created.