haskell-packages 0.2.3.4 → 0.2.4
raw patch · 5 files changed
+27/−5 lines, 5 files
Files
- CHANGELOG.md +7/−0
- haskell-packages.cabal +1/−1
- src/Distribution/HaskellSuite/Cabal.hs +9/−2
- src/Distribution/HaskellSuite/Cabal.hs-boot +5/−0
- src/Distribution/HaskellSuite/Compiler.hs +5/−2
CHANGELOG.md view
@@ -1,6 +1,13 @@ Changes ======= +Version 0.2.4+-------------++* Add `customMain`+* Fix a bug where only one of multiple output files with the same base name but+ different extensions would be copied on installation+ Version 0.2.3.4 ---------------
haskell-packages.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: haskell-packages-version: 0.2.3.4+version: 0.2.4 synopsis: Haskell suite library for package management and integration with Cabal description: See <http://documentup.com/haskell-suite/haskell-packages> license: MIT
src/Distribution/HaskellSuite/Cabal.hs view
@@ -2,7 +2,7 @@ {-# LANGUAGE DeriveDataTypeable, ScopedTypeVariables #-} module Distribution.HaskellSuite.Cabal- ( main )+ ( main, customMain ) where import Data.Typeable@@ -39,7 +39,13 @@ main :: forall c . Compiler.Is c => c -> IO ()-main t =+main = customMain empty++customMain+ :: forall c . Compiler.Is c+ => Parser (IO ())+ -> c -> IO ()+customMain additionalActions t = join $ customExecParser (prefs noBacktrack) $ info (helper <*> optParser) idm where @@ -51,6 +57,7 @@ , supportedLanguages , supportedExtensions , hsubparser $ pkgCommand <> compilerCommand+ , additionalActions ] versionStr = showVersion $ Compiler.version t
src/Distribution/HaskellSuite/Cabal.hs-boot view
@@ -1,7 +1,12 @@ module Distribution.HaskellSuite.Cabal where import {-# SOURCE #-} qualified Distribution.HaskellSuite.Compiler as Compiler+import Options.Applicative main :: Compiler.Is c => c -> IO ()+customMain+ :: Compiler.Is c+ => Parser (IO ())+ -> c -> IO ()
src/Distribution/HaskellSuite/Compiler.hs view
@@ -18,6 +18,7 @@ -- It parses command line options (that are typically passed by Cabal) and -- invokes the appropriate compiler's methods. , main+ , customMain ) where @@ -93,8 +94,10 @@ -> [ModuleName] -> IO () installLib t buildDir targetDir _dynlibTargetDir _pkg mods =- findModuleFiles [buildDir] (fileExtensions t) mods- >>= installOrdinaryFiles normal targetDir+ -- see https://github.com/haskell-suite/haskell-packages/pull/17+ forM_ (fileExtensions t) $ \ext -> do+ findModuleFiles [buildDir] [ext] mods+ >>= installOrdinaryFiles normal targetDir -- | Register the package in the database. If a package with the same id -- is already installed, it should be replaced by the new one.