module-management-0.17.1: Clean up module imports, split and merge modules

Safe HaskellNone




groupBy' :: Ord a => (a -> a -> Ordering) -> [a] -> [[a]]Source

Combine sortBy and groupBy

withCurrentDirectory :: (MonadIO m, MonadBaseControl IO m) => FilePath -> m a -> m aSource

Perform an action with the working directory set to path.

doResult :: (ModuVerse m, MonadDryRun m, MonadVerbosity m) => ModuleResult -> m ModuleResultSource

It is tempting to put import cleaning into these operations, but that needs to be done after all of these operations are completed so that all the compiles required for import cleaning succeed. On the other hand, we might be able to maintain the moduVerse here.

fixExport :: [ModuleName] -> ModuleName -> ModuleName -> ExportSpec l -> String -> String -> String -> Seq String -> Seq StringSource

Update an export spec. The only thing we might need to change is re-exports, of the form module Foo.