packages feed

shake-ext 2.11.0.4 → 2.12.0.0

raw patch · 5 files changed

+2/−187 lines, 5 filesdep −Cabaldep −cpphsdep ~shakePVP ok

version bump matches the API change (PVP)

Dependencies removed: Cabal, cpphs

Dependency ranges changed: shake

API changes (from Hackage documentation)

- Development.Shake.CCJS: ccjs :: [FilePath] -> FilePattern -> Rules ()
- Development.Shake.Cabal: GHC :: Maybe String -> HsCompiler
- Development.Shake.Cabal: GHCJS :: Maybe String -> HsCompiler
- Development.Shake.Cabal: [_suff] :: HsCompiler -> Maybe String
- Development.Shake.Cabal: data HsCompiler
- Development.Shake.Cabal: getCabalDeps :: FilePath -> IO (Version, [FilePath])
- Development.Shake.Cabal: getCabalDepsA :: FilePath -> Action (Version, [FilePath])
- Development.Shake.Cabal: getCabalDepsV :: Verbosity -> FilePath -> IO (Version, [FilePath])
- Development.Shake.Cabal: hsCompiler :: HsCompiler -> String
- Development.Shake.Cabal: platform :: String
- Development.Shake.Cabal: prettyShow :: Pretty a => a -> String
- Development.Shake.Cabal: shakeVerbosityToCabalVerbosity :: Verbosity -> Verbosity
- Development.Shake.Elm: elmMake :: [FilePath] -> [FilePath] -> FilePattern -> Rules ()
- Development.Shake.Literate: illiterateA :: FilePath -> FilePath -> Action ()
- Development.Shake.Literate: literateAgda :: Rules ()
- Development.Shake.Literate: literateAlex :: Rules ()
- Development.Shake.Literate: literateHappy :: Rules ()
- Development.Shake.Literate: literateHaskell :: Rules ()
- Development.Shake.Literate: literateIdris :: Rules ()
- Development.Shake.Literate: unlitA :: FilePath -> FilePath -> Action ()

Files

shake-ext.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: shake-ext-version: 2.11.0.4+version: 2.12.0.0 license: BSD3 license-file: LICENSE copyright: Copyright: (c) 2018 Vanessa McHale@@ -31,12 +31,8 @@         Development.Shake.Man         Development.Shake.Check         Development.Shake.Clean-        Development.Shake.Cabal         Development.Shake.Version         Development.Shake.C-        Development.Shake.CCJS-        Development.Shake.Elm-        Development.Shake.Literate     hs-source-dirs: src     other-modules:         Development.Shake.TH@@ -47,12 +43,10 @@     ghc-options: -Wall     build-depends:         base >=4.9 && <5,-        Cabal >=2.2,         cdeps -any,         composition-prelude -any,-        cpphs -any,         directory -any,-        shake -any,+        shake >=0.14,         template-haskell -any          if flag(development)
− src/Development/Shake/CCJS.hs
@@ -1,16 +0,0 @@-module Development.Shake.CCJS ( ccjs-                              ) where--import           Development.Shake-import           Development.Shake.FilePath-import           System.Directory           (createDirectoryIfMissing)--ccjs :: [FilePath] -- ^ JavaScript source files-     -> FilePattern -- ^ File pattern for build output-     -> Rules ()-ccjs sources fp =-    fp %> \out -> do-        need sources-        (Stdout sout) <- command mempty "ccjs" (sources ++ ["--externs=node"])-        liftIO $ createDirectoryIfMissing True (takeDirectory out)-        liftIO $ writeFile out sout
− src/Development/Shake/Cabal.hs
@@ -1,89 +0,0 @@-module Development.Shake.Cabal ( getCabalDeps-                               , getCabalDepsV-                               , getCabalDepsA-                               , shakeVerbosityToCabalVerbosity-                               -- * Types-                               , HsCompiler (..)-                               -- * Helper functions-                               , platform-                               , hsCompiler-                               -- * Reëxports from "Distribution.Version"-                               , prettyShow-                               ) where--import           Control.Arrow-import           Control.Composition-import           Control.Monad-import           Data.Foldable                          (toList)-import           Data.Maybe                             (catMaybes)-import           Development.Shake                      hiding (doesFileExist)-import qualified Development.Shake                      as Shake-import           Distribution.ModuleName-import           Distribution.PackageDescription-import           Distribution.PackageDescription.Parsec-import           Distribution.Pretty-import           Distribution.Types.CondTree-import           Distribution.Types.PackageId-import           Distribution.Verbosity                 as Distribution-import           Distribution.Version-import           System.Directory                       (doesFileExist)-import           System.Info                            (arch, os)--data HsCompiler = GHC { _suff :: Maybe String -- ^ Compiler version-                      }-                | GHCJS { _suff :: Maybe String -- ^ Compiler version-                        }--hsCompiler :: HsCompiler -> String-hsCompiler (GHC Nothing)    = "ghc"-hsCompiler (GHC (Just v))   = "ghc-" ++ v-hsCompiler (GHCJS Nothing)  = "ghcjs"-hsCompiler (GHCJS (Just v)) = "ghcjs-" ++ v---- | E.g. @x86_64-linux@-platform :: String-platform = arch ++ "-" ++ os--libraryToFiles :: Library -> [FilePath]-libraryToFiles lib = mconcat [cs, is, hs]-    where (cs, is) = (cSources &&& includes) $ libBuildInfo lib-          hs = (++ ".hs") . toFilePath <$> explicitLibModules lib--extract :: CondTree a b Library -> [Library]-extract (CondNode d _ []) = [d]-extract (CondNode d _ bs) = d : (g =<< bs)-    where g (CondBranch _ tb fb) = join $ catMaybes [Just $ extract tb, extract <$> fb]---- | Assign each shake @Verbosity@ level to a Cabal @Verbosity@ level.-shakeVerbosityToCabalVerbosity :: Shake.Verbosity -> Distribution.Verbosity-shakeVerbosityToCabalVerbosity Silent     = silent-shakeVerbosityToCabalVerbosity Quiet      = normal-shakeVerbosityToCabalVerbosity Normal     = normal-shakeVerbosityToCabalVerbosity Loud       = verbose-shakeVerbosityToCabalVerbosity Chatty     = verbose-shakeVerbosityToCabalVerbosity Diagnostic = deafening---- | Get cabal dependencies, respecting verbosity level given to--- [shake](http://shakebuild.com/).-getCabalDepsA :: FilePath -> Action (Version, [FilePath])-getCabalDepsA = join . (g <$> fmap shakeVerbosityToCabalVerbosity getVerbosity <*>) . pure-    where g = liftIO .* getCabalDepsV---- | Get library dependencies from a @.cabal@ file. This will only work for--- @.hs@ files; module signatures are not supported.-getCabalDeps :: FilePath -> IO (Version, [FilePath])-getCabalDeps = getCabalDepsV normal--getCabalDepsV :: Distribution.Verbosity -> FilePath -> IO (Version, [FilePath])-getCabalDepsV v p = do-    pkg <- readGenericPackageDescription v p-    let descr = packageDescription pkg-        extraSrc = extraSrcFiles descr-        vers = pkgVersion (package descr)-        libs = toList (condLibrary pkg)-        normalSrc = (libraryToFiles <=< extract) =<< libs-        dir = (fmap (++ "/") . hsSourceDirs . libBuildInfo <=< extract) =<< libs-        dirge = ((++) <$> dir <*>)-        h = filterM doesFileExist-    norms <- h (dirge normalSrc)-    pure (vers, extraSrc ++ norms)
− src/Development/Shake/Elm.hs
@@ -1,14 +0,0 @@-module Development.Shake.Elm ( elmMake-                             ) where--import           Development.Shake---- | Rules for calling @elm-make@.-elmMake :: [FilePath] -- ^ Elm source files-        -> [FilePath] -- ^ Extra source files to be tracked-        -> FilePattern -- ^ Build output-        -> Rules ()-elmMake sources extras fp =-    fp %> \out -> do-        need (sources ++ extras)-        command mempty "elm-make" ("--yes" : "--output" : out : "--warn" : sources)
− src/Development/Shake/Literate.hs
@@ -1,60 +0,0 @@--- | Module containing functions for working with the--- [illiterate](http://github.com/vmchale/illiterate) preprocessor for literate--- programs.-module Development.Shake.Literate ( -- * Action-                                    illiterateA-                                  , unlitA-                                  -- * Rules-                                  , literateHaskell-                                  , literateIdris-                                  , literateAlex-                                  , literateHappy-                                  , literateAgda-                                  ) where--import           Development.Shake-import           Development.Shake.FilePath-import           Language.Preprocessor.Unlit---- | This uses the [illiterate](https://github.com/vmchale/illiterate)--- preprocessor.-illiterateA :: FilePath -- ^ Literate source file-            -> FilePath -- ^ Generated source-            -> Action ()-illiterateA inF outF = do-    (Stdout o) <- cmd ["lit", inF]-    liftIO $ writeFile outF o---- | This uses the 'unlit' function provided by the @cpphs@ package.-unlitA :: FilePath -- ^ Literate source file-       -> FilePath -- ^ Generated source-       -> Action ()-unlitA inF outF = liftIO (g =<< readFile inF)-    where g = writeFile outF . unlit inF--literateRules :: String -- ^ File extension-              -> Rules ()-literateRules ext = pat %> g-    where pat = "//*." ++ ('l' : ext)-          g out = let new = fst (splitExtension out) ++ ('.' : ext)-            in unlitA out new---- | Rules for building @.lhs@ files.-literateHaskell :: Rules ()-literateHaskell = literateRules "hs"---- | Rules for building @.lagda@ files.-literateAgda :: Rules ()-literateAgda = literateRules "agda"---- | Rules for building @.lidr@ files.-literateIdris :: Rules ()-literateIdris = literateRules "idr"---- | Rules for building @.lx@ files-literateAlex :: Rules ()-literateAlex = literateRules "x"---- | Rules for building @.ly@ files-literateHappy :: Rules ()-literateHappy = literateRules "y"