module-management 0.18 → 0.20
raw patch · 6 files changed
+29/−7 lines, 6 filessetup-changed
Files
- Language/Haskell/Modules/Imports.hs +9/−1
- Language/Haskell/Modules/Params.hs +1/−1
- Setup.hs +1/−1
- changelog +13/−0
- module-management.cabal +5/−4
- testdata.tar.gz binary
Language/Haskell/Modules/Imports.hs view
@@ -32,6 +32,7 @@ import Language.Haskell.Modules.Util.Symbols (symbols) import System.Directory (createDirectoryIfMissing, getCurrentDirectory) import System.Exit (ExitCode(..))+import System.FilePath ((</>)) import System.Process (readProcessWithExitCode, showCommandForUser) #if MIN_VERSION_haskell_src_exts(1,14,0)@@ -152,7 +153,14 @@ -- their members are imported too. checkImports :: MonadClean m => ModuleInfo -> m ModuleResult checkImports info@(ModuleInfo (A.Module _ mh _ imports _) _ _ _) =- do let importsPath = maybe "Main" (\ (A.ModuleHead _ (A.ModuleName _ s) _ _) -> s) mh ++ ".imports"+ do+#if __GLASGOW_HASKELL__ >= 708+ scratch <- scratchDir <$> getParams+#else+ let scratch = "."+#endif+ let importsPath = scratch </> maybe "Main" (\ (A.ModuleHead _ (A.ModuleName _ s) _ _) -> s) mh ++ ".imports"+ -- The .imports file will appear in the real current directory, -- ignore the source dir path. This may change in future -- versions of GHC, see http://ghc.haskell.org/trac/ghc/ticket/7957
Language/Haskell/Modules/Params.hs view
@@ -96,7 +96,7 @@ -- instance of 'MonadClean'. runCleanT :: (MonadIO m, MonadBaseControl IO m) => CleanT m a -> m a runCleanT action =- withTempDirectory "." "scratch" $ \ scratch ->+ withTempDirectory "." "hmm" $ \ scratch -> do (result, params) <- runStateT action (Params {scratchDir = scratch, dryRun = False, verbosity = 1,
Setup.hs view
@@ -4,7 +4,7 @@ import Distribution.Simple.LocalBuildInfo (LocalBuildInfo(buildDir)) -- import Language.Haskell.Imports.Clean (cleanBuildImports) -- import Language.Haskell.Imports.Params (runParamsT)-import System.Cmd (system)+import System.Process (system) import System.Exit (ExitCode(ExitSuccess)) import System.Directory (setCurrentDirectory, copyFile) import System.FilePath ((</>))
changelog view
@@ -1,3 +1,16 @@+haskell-module-management (0.20) unstable; urgency=low++ * GHC-7.8 honors the -outputdir flag for dumped imports, so look for+ them there.++ -- David Fox <dsf@seereason.com> Wed, 16 Apr 2014 12:33:25 -0700++haskell-module-management (0.19) unstable; urgency=low++ * Increase the context-stack size from 20 to 60 to avoid crashing ghc-7.8.1++ -- David Fox <dsf@seereason.com> Mon, 31 Mar 2014 08:53:21 -0700+ haskell-module-management (0.18) unstable; urgency=low * Turn off the TransformListComp extension for parsing, it makes "group"
module-management.cabal view
@@ -1,5 +1,5 @@ Name: module-management-Version: 0.18+Version: 0.20 Synopsis: Clean up module imports, split and merge modules Description: Clean up module imports, split and merge modules. Homepage: http://src.seereason.com/module-management@@ -89,8 +89,8 @@ cmdargs, lens - -- This prevents one of two failures: either a GHC out of memory error,- -- or an out of simplifier ticks error:+ -- In ghc-7.6.3, -O0 prevents one of two failures: either a GHC out+ -- of memory error, or an out of simplifier ticks error: -- ghc: panic! (the 'impossible' happened) -- (GHC version 7.6.3 for x86_64-unknown-linux): -- Simplifier ticks exhausted@@ -99,7 +99,8 @@ -- If you need to do this, let GHC HQ know, and what factor you needed -- To see detailed counts use -ddump-simpl-stats -- Total ticks: 1186241- ghc-options: -O0+ -- In 7.8.1 increasing the context stack size from 20 to 60 seems necessary.+ ghc-options: -O0 -fcontext-stack=60 Executable tests Main-is: Tests.hs
testdata.tar.gz view
binary file changed (541137 → 528650 bytes)