
I am pleased to announce the first release of module-management, a package for cleaning import lists, and splitting and merging modules. You can see a description at the top of the documentation for Language.Haskell.Modules (once it appears) here: http://hackage.haskell.org/package/module-management It is worth noting that the split and merge operations cause global changes to the module tree, all the modules that import the split or merged modules get their import lists adjusted. For this reason, before these operations can run the caller needs to specify the "moduVerse", the set of modules to scan for import changes. A number of bugs in GHC's -ddump-minimal-imports feature cropped up while I was writing this, and when the fixes for these issues make it into the compiler things will work a bit more smoothly, particularly if you are using NoImplicitPrelude or type families. http://hackage.haskell.org/trac/ghc/ticket/7963 http://hackage.haskell.org/trac/ghc/ticket/7969 http://hackage.haskell.org/trac/ghc/ticket/8000 http://hackage.haskell.org/trac/ghc/ticket/8011 There are workarounds for 7963 and 7969. Not surprisingly, template haskell can cause problems, but frequently it does not. CPP directives do not work. I hope you find this useful - all feedback is welcome! -david