packages feed

hake 0.9.9 → 1.0

raw patch · 6 files changed

+25/−16 lines, 6 filesdep ~yjtoolsPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: yjtools

API changes (from Hackage documentation)

+ Development.Hake: const2 :: a -> b -> c -> a
+ Development.Hake: delRules :: [Rule] -> [(FilePath, [FilePath])] -> [Rule]
- Development.Hake.FunSet: file :: [String] -> [String] -> (String -> [String]) -> Rule
+ Development.Hake.FunSet: file :: [String] -> [String] -> (String -> [String] -> [String]) -> Rule
- Development.Hake.FunSetIO: file :: [String] -> [String] -> (String -> IO ExitCode) -> Rule
+ Development.Hake.FunSetIO: file :: [String] -> [String] -> (String -> [String] -> IO ExitCode) -> Rule
- Development.Hake.FunSetRaw: file :: [String] -> [String] -> (String -> [[String]]) -> Rule
+ Development.Hake.FunSetRaw: file :: [String] -> [String] -> (String -> [String] -> [[String]]) -> Rule

Files

Development/Hake.hs view
@@ -27,6 +27,7 @@ , mkfl  , addDeps+, delRules , setCmd  , systemE@@ -38,6 +39,7 @@ , getNewers  , ExitCode(ExitSuccess, ExitFailure)+, const2  ) where @@ -51,7 +53,7 @@ import Control.Monad.Tools          (whenM) import Control.Applicative          ((<$>)) import Data.List                    (isSuffixOf, isPrefixOf)-import Data.List.Tools              (dropUntil)+import Data.List.Tools              (dropUntil, isIncludedElem) import Data.Maybe                   (listToMaybe, catMaybes) import Data.Bool.Tools              ((&&&), (|||)) import Data.Function.Tools          (const2)@@ -98,6 +100,17 @@   del t r@(pt, _, _)     | pt t      = modifyFirstOfThree (&&& (/=t)) r     | otherwise = r+  modifyFirstOfThree f (x, y, z) = (f x, y, z)++delRules :: [ Rule ] -> [ (FilePath, [FilePath]) ] -> [ Rule ]+delRules rls delrls = map dels rls+  where+  dels :: Rule -> Rule+  dels r = foldr del r delrls+  del :: (FilePath, [FilePath]) -> Rule -> Rule+  del (t, ss) r@(pt, mkSs, _)+    | pt t && isIncludedElem ss (mkSs t) = modifyFirstOfThree (&&& (/=t)) r+    | otherwise                          = r   modifyFirstOfThree f (x, y, z) = (f x, y, z)  setCmd ::
Development/Hake/FunSet.hs view
@@ -13,10 +13,10 @@ import Development.Hake.Types       (Rule, getSrcs) import Development.Hake.Tools       (changeSuffix, systemE) -file :: [String] -> [String] -> (String -> [String]) -> Rule+file :: [String] -> [String] -> (String -> [String] -> [String]) -> Rule file trgts srcs cmd   = ( \f -> or $ map (==f) trgts, const srcs,-      \t -> const $ sequence_ $ map systemE $ cmd t )+      \t s -> sequence_ $ map systemE $ cmd t s )  task :: String -> [String] -> Rule task trgts cmd = ( (==trgts), const [], const2 $ sequence_ $ map systemE cmd )
Development/Hake/FunSetIO.hs view
@@ -18,10 +18,10 @@ import Development.Hake.Tools       (orDie, changeSuffix)                                       -file :: [String] -> [String] -> (String -> IO ExitCode) -> Rule+file :: [String] -> [String] -> (String -> [String] -> IO ExitCode) -> Rule file trgts srcs cmd   = ( \f -> or $ map (==f) trgts, const srcs,-      const . lift . (flip orDie show) . cmd )+      \t s -> lift $ (flip orDie show) $ cmd t s )  task :: String -> IO ExitCode -> Rule task trgts cmd = ( (==trgts), const [], const2 $ lift cmd `orDie` show)
Development/Hake/FunSetRaw.hs view
@@ -13,10 +13,10 @@ import Development.Hake.Types       (Rule, getSrcs) import Development.Hake.Tools       (changeSuffix, rawSystemE) -file :: [String] -> [String] -> (String -> [[String]]) -> Rule+file :: [String] -> [String] -> (String -> [String] -> [[String]]) -> Rule file trgts srcs cmd   = ( \f -> or $ map (==f) trgts, const srcs,-      \t -> const $ sequence_ $ map rawSystemE $ cmd t )+      \t s -> sequence_ $ map rawSystemE $ cmd t s )  task :: String -> [[String]] -> Rule task trgts cmd
Development/Hake/Variables.hs view
@@ -36,5 +36,5 @@ commentPair          = ("{- ", " -}") exeEscPairs          = [("/","_s_"),("\\.","_d_"),("_","_u_")] -defaultTrgtStr       = "default"+defaultTrgtStr       = "__default" hakefileUpdateOption = "--hakefile-is-updated"
hake.cabal view
@@ -1,5 +1,5 @@ Name:		hake-Version:	0.9.9+Version:	1.0 License:	GPL License-file:	LICENSE Author:		Yoshikuni Jujo@@ -14,10 +14,6 @@ 		Hakefile is just Haskell source code, 		then you can use all Haskell features. 		.-		I have changed Hakefile syntax.-		If you want to use old Hakefile,-		put 'import Development.Hake.OldFunSet'.-		. 		> import Development.Hake 		> import Development.Hake.FunSetRaw 		> hake_rules = [@@ -25,7 +21,7 @@ 		>  dflt	[ "greeting" ] 		>  , 		>  file	[ "greeting", "greeting.log" ] [ "hello.o", "good-bye.o" ] $-		> 		const [ [ "linker", "-o", "greeting", "hello.o", "good-bye.o" ] ]+		> 		const2 [ [ "linker", "-o", "greeting", "hello.o", "good-bye.o" ] ] 		>  , 		>  rule	".o" ".sfx1" $ 		> 		\t (s:_) -> [ [ "compiler1", s, "-o", t ] ]@@ -55,7 +51,7 @@ 		> 		> main = hake hake_rules -Stability:	semi-stable+Stability:	stable Homepage:	http://homepage3.nifty.com/salamander/second/projects/hake/index.xhtml Package-Url:	http://code.haskell.org/hake/ Cabal-Version:	>= 1.2@@ -73,5 +69,5 @@  Executable hake   GHC-Options:		-Wall-  Build-Depends:	directory, process, yjtools >= 0.9.5, regexpr >= 0.3+  Build-Depends:	directory, process, yjtools >= 0.9.6, regexpr >= 0.3   Main-Is:		Main.hs