2      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Safe-InferrediAll foreseen exception conditions thrown by Shake, such problems with the rules or errors when executing 4 rules, will be raised using this exception type.  Safe-InferredTA type representing a finite resource, which multiple build actions should respect.  Created with  and used with   when defining rules. WAs an example, only one set of calls to the Excel API can occur at one time, therefore < Excel is a finite resource of quantity 1. You can write:       {  =2} $ do    ["a.xls","b.xls"]  excel <-  "Excel" 1  "*.xls"   \out ->   excel 1 $   "excel" [out,...] Now the two calls to excel$ will not happen in parallel. Using   is better than L as it will not block any other threads from executing. Be careful that the  actions run within C do not themselves require further quantities of this resource, or  you may get a "0thread blocked indefinitely in an MVar operation" exception. Typically only  system commands (such as ) will be run inside ,  not commands such as . ^As another example, calls to compilers are usually CPU bound but calls to linkers are usually b disk bound. Running 8 linkers will often cause an 8 CPU system to grid to a halt. We can limit  ourselves to 4 linkers with:   disk <-  "Disk" 4    [show i  "exe" | i < - [1..100]]  "*.exe"   \out ->   disk 1 $   "ld" ["-o",out,...]  "*.o"   \out ->   "cl" ["-o",out,...] .Starts out empty, then is filled exactly once &Like an MVar, but must always be full Like an MVar, but has no value  A version of  newResource3 that runs in IO, and can be called before calling  .  Most people should use  instead. jTry to acquire a resource. Returns Nothing to indicate you have acquired with no blocking, or Just act to O say after act completes (which will block) then you will have the resource. MYou should only ever releaseResource that you obtained with acquireResource. NoneHGiven a pool, and a function that breaks the S invariants, restore them 2 They are only allowed to touch working or todo Add a new task to the pool EA blocking action is being run while on the pool, yield your thread. 5 Should only be called by an action under addPool. MIf the first part of the result is True then the result is sufficiently high K priority that you may exceed the pool limit to get it done immediately. M Always the result of a child thread raising an error, which will probably ! raise an error in the parent. <Run all the tasks in the pool on the given number of works. F If any thread throws an exception, the exception will be reraised.  Safe-Inferred  Safe-Inferred   Safe-Inferred1Generates an HTML report given some build system " profiling data in JSON format. ETemplate Engine. Perform the following replacements on a line basis:   script src="foo" /script ==>  script[[foo]] /script   link-href="foo" rel="stylesheet" type="text/css" / ==>  styletype="text/css"[[foo]] /style  Safe-Inferred Drop the first directory from a . Should only be used on  relative paths. # dropDirectory1 "aaa/bbb" == "bbb"  dropDirectory1 "aaa/" == ""  dropDirectory1 "aaa" == ""  dropDirectory1 "" == "" Take the first component of a . Should only be used on  relative paths. # takeDirectory1 "aaa/bbb" == "aaa"  takeDirectory1 "aaa/" == "aaa"  takeDirectory1 "aaa" == "aaa"  Normalise a , applying the standard  normalisation, plus & translating any path separators to / and removing foo/.. components where possible. *Convert to native path separators, namely \ on Windows. %Combine two file paths, an alias for . $Combine two file paths. Any leading ./ or ../ components in the right file  are eliminated. * combine "aaa/bbb" "ccc" == "aaa/bbb/ccc" , combine "aaa/bbb" "./ccc" == "aaa/bbb/ccc" ) combine "aaa/bbb" "../ccc" == "aaa/ccc" The extension of executables, "exe" on Windows and "" otherwise. 5     None  None !"#$%&'() ! !"#$%&'()None *+,-./01234*,./0123 *+,-./01234None56789:589:56789: Safe-Inferred-A type synonym for file patterns, containing // and *. For the syntax  and semantics of  see . ;$Return is (brackets, matched, rest) Match a  against a $, There are only two special forms:  *= matches an entire path component, excluding any separators.  //1 matches an arbitrary number of path components. Some examples that match:    "*.c"  "foo/bar/baz.c"  "*.c"  "baz.c"  "*.c"  "baz.c"  "test.c"  "test.c" Examples that don't match:    "*.c"  "foo/bar.c"  "*/*.c"  "foo/bar/baz.c" )An example that only matches on Windows:   "foo/bar"  "foo\\bar" <?Given a pattern, return the directory that requires searching,  with =: if it requires a recursive search. Must be conservative.  Examples: $ directories1 "*.xml" == ("",False) % directories1 "//*.xml" == ("",True) + directories1 "foo//*.xml" == ("foo",True) 3 directories1 "foo/bar/*.xml" == ("foo/bar",False) ) directories1 "*/bar/*.xml" == ("",True) >NGiven a set of patterns, produce a set of directories that require searching,  with =D if it requires a recursive search. Must be conservative. Examples: . directories ["*.xml","//*.c"] == [("",True)] F directories ["bar/*.xml","baz//*.c"] == [("bar",False),("baz",True)] F directories ["bar/*.xml","baz//*.c"] == [("bar",False),("baz",True)] ?Do they have the same * and  counts in the same order @EExtract the items that match the wildcards. The pair must match with . AGiven the result of @, substitute it back in to a ? pattern. / p '?==' x ==> substitute (extract p x) p == x BCDEFGHIJKLMNOPQRSTUV;<>?@A<>?@ABC MLKJIHGFEDNQPORSTUV;<>?@ANoneZInformation about the current state of the build, obtained by passing a callback function  to . Typically a program will use ' to poll this value and produce ? status messages, which is implemented using this data type.  Starts out = , becomes W once the build has completed. HNumber of rules which were required, but were already in a valid state. 8Number of rules which were have been built in this run. !XNumber of rules which have been built previously, but are not yet known to be required. "hNumber of rules which are currently required (ignoring dependencies that do not change), but not built. #Time spent building  rules in previous runs. $Time spent building   rules. %Time spent building ! rules in previous runs. &Time spent building "b rules in previous runs, plus the number which have no known time (have never been built before). XGMake a guess at the number of seconds to go, ignoring multiple threads 'PGiven a sampling interval (in seconds) and a way to display the status message, , produce a function suitable for using as . 6 This function polls the progress information every n seconds, produces a status 7 message and displays it using the display function. .Typical status messages will take the form of  1:25m (15%), indicating that the build \ is predicted to complete in 1min 25sec, and 15% of the necessary build time has elapsed. Z This function uses past observations to predict future behaviour, and as such, is only [ guessing. The time is likely to go up as well as down, and will be less accurate from a < clean build (as the system has fewer past observations). FThe current implementation is to predict the time remaining (based on & ) and the  work already done ($(). The percentage is then calculated as  remaining / (done + remaining), , while time left is calculated by scaling  remaining* by the observed work rate in this build,  namely done / time_elapsed. (FSet the title of the current console window to the given text. If the  environment variable $TERM is set to xterm# this uses xterm escape sequences. C On Windows, if not detected as an xterm, this function uses the SetConsoleTitle API. )HA simple method for displaying progress messages, suitable for using as  /. This function writes the current progress to @ the titlebar every five seconds. The function is defined as:  progressSimple = ' 5 (  !"#$%&YX'Z()[ !"#$%&'()  !"#$%&YX'Z()[None*!The verbosity data type, used by 5. +HPrint messages for virtually everything (for debugging a build system). ,HPrint lots of messages (typically errors, warnings and status updates). -7Print normal messages (typically errors and warnings). .2Only print essential messages (typically errors). /Don't print any messages. \,Internal type, copied from Hide in Uniplate 0UOptions to control the execution of Shake, usually specified by overriding fields in  C:   C{3=4, 7=Just " report.html"}The ]$ instance for this type reports the ># field as having the abstract type \,  because ]" cannot be defined for functions. 2 Defaults to .shakeD. The prefix of the filename used for storing Shake metadata files. $ All metadata files will be named 2. extension , for some  extension. 3 Defaults to 19. Maximum number of rules to run in parallel, similar to  make --jobs=N. 6 To enable parallelism you may need to compile with  -threaded. e For many build systems, a number equal to or slightly less than the number of physical processors  works well. 4 Defaults to 1*. The version number of your build rules. N Change the version number to force a complete rebuild, such as when making V significant changes to the rules that require a wipe. The version number should be ? set in the source code, and not passed on the command line. 5 Defaults to -0. What level of messages should be printed out. 6 Defaults to WG. Operate in staunch mode, where building continues even after errors,  similar to make --keep-going. 7 Defaults to ^:. Write an HTML profiling report to a file, showing which j rules rebuilt, why, and how much time they took. Useful for improving the speed of your build systems. 8 Defaults to WN. Perform basic sanity checks during building, checking the current directory M is not modified and that output files are not modified by multiple rules. K These sanity checks do not check for missing or redundant dependencies. 9 Defaults to WX. Run rules in a deterministic order, as far as possible. Typically used in conjunction  with 3=12 for reproducing a build. If this field is set to W, Shake will run rules b in a random order, which typically decreases contention for resources and speeds up the build. : Defaults to _ 109. How often to flush Shake metadata files in seconds, or ^ to never flush explicitly. m It is possible that on abnormal termination (not Haskell exceptions) any rules that completed in the last  : seconds will be lost. ; Defaults to ^$. Assume all build objects are clean/ dirty, see @ for details.  Can be used to implement  make --touch. < Defaults to []l. A list of substrings that should be abbreviated in status messages, and their corresponding abbreviation. 1 Commonly used to replace the long paths (e.g. .make/i586-linux-gcc/output) with an abbreviation (e.g. $OUT). = Defaults to W. Write a message to 2.storage3 whenever a storage event happens which may impact { on the current stored progress. Examples include database version number changes, database compaction or corrupt files. >wDefaults to no action. A function called on a separate thread when the build starts, allowing progress to be reported. < For applications that want to display progress messages, )( is often sufficient, but more advanced  users should look at the  data type. ?Defaults to writing using `B. A function called to output messages from Shake, along with the * at ` which that message should be printed. This function will be called atomically from all other ? functions.  The *, will always be greater than or higher than 5. @:The current assumptions made by the build system, used by ;. These options ] allow the end user to specify that any rules run are either to be treated as clean, or as 6 dirty, regardless of what the build system thinks. ?These assumptions only operate on files reached by the current  commands. Any 3 other files in the database are left unchanged. ABThis assumption is unsafe, and may lead to incorrect build results. \ Assume that all rules reached are clean and do not require rebuilding, provided the rule  has a G and has been built before. Useful if you have modified a file in some ^ inconsequential way, such as only the comments or whitespace, and wish to avoid a rebuild. BNAssume that all rules reached are dirty and require rebuilding, equivalent to  always  returning ^ . Useful to undo the results of A%, for benchmarking rebuild speed and a for rebuilding if untracked dependencies have changed. This assumption is safe, but may cause # more rebuilding than necessary. CThe default set of 0. -ab*+,-./\cd0123456789:;<=>?@ABCefghijklmnopqr* !"#$%&a*+,-./0123456789:;<=>?@ABCjklmab*/.-,+\cd0123456789:;<=>?@BACefghijklmnopqrNones$Is the exception asyncronous, not a  coding error that should be ignored tuvStorage options Logging function Witness Execute wxyzsvtuvwxyzsNone{[Given a Key and a Value from the database, check it still matches the value stored on disk |mGiven a chunk of stack (bottom element first), and a key, either raise an exception or successfully build it }NInvariant: The database does not have any cycles when a Key depends on itself ~DCall once at the start, then call repeatedly to get Time values out TReturn either an exception (crash), or (how much time you spent waiting, the value) uGiven a map of representing a dependency order (with a show for error messages), find an ordering for the items such 1 that no item points to an item before itself. . Raise an error if you end up with a cycle. ;Eliminate all errors from the database, pretending they don't exist K{|}~{|}~.{|}~ NoneDThe D monad, use  to raise  actions into it, and need to execute files.  Action values are used by J and K. E:Define a set of rules. Rules can be created with calls to J, I or K. Rules are combined  with either the " instance, or (more commonly) the  instance and do notation. F8Define a pair of types that can be used by Shake rules. / To import all the type classes required see Development.Shake.Classes. G Retrieve the value associated with a key, if available. As an example for filenames/1timestamps, if the file exists you should return _ ' the timestamp, but otherwise return ^!. For rules whose values are not  stored externally, G should return ^. HODefine an alias for the six type classes required for things involved in Shake !s. G This alias is only available in GHC 7.4 and above, and requires the ConstraintKinds extension. cTo define your own values meeting the necessary constraints it is convenient to use the extensions  GeneralizedNewtypeDeriving and DeriveDataTypeable to write: [ newtype MyType = MyType (String, Bool) deriving (Show,Typeable,Eq,Hashable,Binary,NFData) ILike J, but lower priority, if no J exists then I is checked. ' All default rules must be disjoint. J4Add a rule to build a key, returning an appropriate D. All rules must be disjoint. & To define lower priority rules use I. TAdd a rule at a given priority, higher numbers correspond to higher-priority rules.  The function I is priority 0 and J& is priority 1. All rules of the same  priority must be disjoint. KCRun an action, usually used for specifying top-level requirements. LNRemove all actions specified in a set of rules, usually used for implementing 0 command line specification of what to build. M!If an exception is raised by the D, perform some . N After an D, perform some !, even if there is an exception. /Internal main function (not exported publicly) OaExecute a rule, returning the associated values. If possible, the rules will be run in parallel. F This function requires that appropriate rules have been added with J or I. P+Apply a single rule, equivalent to calling O( with a singleton list. Where possible,  use O to allow parallelism. Q7Write an action to the trace list, along with the start/#end time of running the IO action.  The " command automatically calls Q-. The trace list is used for profile reports  (see 7). R2Write a message to the output when the verbosity (5) is appropriate. D The output will not be interleaved with any other Shake messages 4 (other than those generated by system commands). S2Write a message to the output when the verbosity (5) is appropriate. D The output will not be interleaved with any other Shake messages 4 (other than those generated by system commands). T2Write a message to the output when the verbosity (5) is appropriate. D The output will not be interleaved with any other Shake messages 4 (other than those generated by system commands). U+Get the current verbosity level, as set by 5 . If you I want to output information to the console, you are recommended to use  R / S / T&, which ensures multiple messages are  not interleaved. 1Run an action with a particular verbosity level. VRun an action with ./ verbosity, in particular messages produced by Q  (including from %) will not be printed to the screen. WlCreate a new finite resource, given a name (for error messages) and a quantity of the resource that exists.  For an example see . XGRun an action which uses part of a finite resource. For an example see . FDEFGHIJKLMNOPQRSTUVWXDEFGHIJKLMNOPQRSTUVWX-DEFGHIJKLMNOPQRSTUVWX#None MThis function is not actually exported, but Haddock is buggy. Please ignore. YReturns = if the file exists. ZReturns = if the directory exists. [Return _+ the value of the environment variable, or ^  if the variable is not set. \QGet the contents of a directory. The result will be sorted, and will not contain  the entries . or ..M (unlike the standard Haskell version). The resulting paths will be relative  to the first argument. %It is usually simpler to call either ] or ^. ]NGet the files anywhere under a directory that match any of a set of patterns. . For the interpretation of the patterns see . All results will be  relative to the  argument. Some examples: ( getDirectoryFiles "Config" ["//*.xml"] ; -- All .xml files anywhere under the Config directory D -- If Config/foo/bar.xml exists it will return ["foo/bar.xml"] . getDirectoryFiles "Modules" ["*.hs","*.lhs"] 1 -- All .hs or .lhs in the Modules directory Y -- If Modules/foo.hs and Modules/foo.lhs exist, it will return ["foo.hs","foo.lhs"] ^2Get the directories in a directory, not including . or ... ; All directories are relative to the argument directory.  getDirectoryDirs "/Users" 6 -- Return all directories in the /Users directory % -- e.g. ["Emily","Henry","Neil"] _[Remove all empty directories and files that match any of the patterns beneath a directory.  Some examples:    _ "output" ["//*"]  _ "." ["//*.hi","//*.o"] -This function is often useful when writing a 'clean'! function for your build system, " often as the first argument to  shakeWithArgs. `Remove files, like _7, but executed after the build completes successfully.  Useful for implementing clean= actions that delete files Shake may have open for building. 2     YZ[\]^_` !"# YZ[\]^_`&     YZ[\]^_` !"#$None $MThis function is not actually exported, but Haddock is buggy. Please ignore. aKRequire that the following files are built before continuing. Particularly  necessary when calling . As an example:   "*.rot13" f \ out -> do  let src =  out  a [src]   ["rot13",src,"-o",out] bORequire that the following are built by the rules, used to specify the target.    main =   C $ do  b ["Main.exe"]  ... This program will build Main.exe, given sufficient rules. cZDeclare a phony action, this is an action that does not produce a file, and will be rerun 7 in every execution that requires it. You can demand c rules using  'want'/'need'. d<Define a rule to build files. If the first argument returns = for a given file, 9 the second argument will be used to build it. Usually f is sufficient, but d gives X additional power. For any file used by the build system, only one rule should return =.   (all isUpper . ) d \ out -> do  let src = & out $ map toLower $ takeBaseName out  % . map toUpper =<< & src eQDefine a set of patterns, and if any of them match, run the associated rule. See f. fDefine a rule that matches a ). No file required by the system must be @ matched by more than one pattern. For the pattern rules, see .    "*.asm.o" f \ out -> do  let src =  out  a [src]   ["as",src,"-o",out] MTo define a build system for multiple compiled languages, we recommend using .asm.o,  .cpp.o, .hs.o6, to indicate which language produces an object file.  I.e., the file foo.cpp produces object file  foo.cpp.o. 7Note that matching is case-sensitive, even on Windows. g A version of h3 that runs in IO, and can be called before calling  .  Most people should use h instead. hpGiven a way of loading information from a file, produce a cached version that will load each file at most once. U Using the cached function will still result in a dependency on the original file. ` The argument function should not access any files other than the one passed as its argument.  Each call to hD creates a separate cache that is independent of all other calls to h. LThis function is useful when creating files that store intermediate values, o to avoid the overhead of repeatedly reading from disk, particularly if the file requires expensive parsing.  As an example:    digits <- h $ \ file -> do  src <- readFile file * return $ length $ filter isDigit src  "*.digits" f \x ->  v1 < - digits ( x)  v2 < - digits ( x)  % x $ show (v1,v2) To create the result MyFile.txt.digits the file  MyFile.txt, will be read and counted, but only at most  once per execution. %&'($ab)cdefgh*+ $abcdefgh%&'($ab)cdefgh*+'Nonei1Add extra information which rules can depend on. 0 An oracle is a function from a question type q, to an answer type a. ` As an example, we can define an oracle allowing you to depend on the current version of GHC:   W newtype GhcVersion = GhcVersion () deriving (Show,Typeable,Eq,Hashable,Binary,NFData)  i $ \.(GhcVersion _) -> fmap (last . words . fst) $ ( "ghc" [" --version"] If a rule calls j (GhcVersion ())<, that rule will be rerun whenever the GHC version changes.  Some notes:  We define  GhcVersion with a newtype around (), allowing the use of GeneralizedNewtypeDeriving. 4 All the necessary type classes are exported from Development.Shake.Classes.  Each call to i( must use a different type of question.  Actions passed to i/ will be run in every build they are required, \ but if their value does not change they will not invalidate any rules depending on them. > To get a similar behaviour using data stored in files, see ).  If the value returned by j is ignored then k) may help avoid ambiguous type messages. $ Alternatively, use the result of i , which is j! restricted to the correct type. GAs a more complex example, consider tracking Haskell package versions:   Vnewtype GhcPkgList = GhcPkgList () deriving (Show,Typeable,Eq,Hashable,Binary,NFData) `newtype GhcPkgVersion = GhcPkgVersion String deriving (Show,Typeable,Eq,Hashable,Binary,NFData)  do  getPkgList <- i $ \GhcPkgList{} -> do  (out,_) <- ( "ghc-pkg" ["list","--simple-output"] + return [(reverse b, reverse a) | x <%- words out, let (a,_:b) = break (== '-' ) $ reverse x]  --  getPkgVersion <- i $ \(GhcPkgVersion pkg) -> do  pkgs < - getPkgList ! return $ lookup pkg pkgs >Using these definitions, any rule depending on the version of shake  should call getPkgVersion "shake" to rebuild when shake is upgraded. j&Get information previously added with i. The question/'answer types must match those provided  to i. k&Get information previously added with i+. The second argument is not used, but can M be useful to fix the answer type, avoiding ambiguous type error messages. ,-./ijk0ijk,-./ijk0*NonelIAlways rerun the associated action. Useful for defining rules that query ! the environment. For example:   "ghcVersion.txt"   \ out -> do  l  (stdout,_) <- ( "ghc" [" --version"]  + out stdout  1234l56789l51234l56789,Nonem[Main entry point for running Shake build systems. For an example see the top of the module Development.Shake.  Use 0% to specify how the system runs, and E3 to specify what to build. The function will throw $ an exception if the build fails. $To use command line flags to modify 0 see -. mmm.NonenCRun a build system using command line arguments for configuration. & The available flags are those from p, along with a few additional  make. compatible flags that are not represented in 0 , such as --print-directory. + If there are no file arguments then the E1 are used directly, otherwise the file arguments  are bed (after calling L). As an example:    main = n C{2 = "_make/", > = )} $ do  c "clean" $ / "_make" "//*"  b ["_make/neil.txt","_make/ emily.txt"]  "_make/*.txt" f \out -> # ... build action here ... +This build system will default to building neil.txt and  emily.txt#, while showing progress messages, 4 and putting the Shake files in locations such as _make/ .database#. Some example command line flags:  main --no-progress" will turn off progress messages.  main -j6 will build on 6 threads.   main --help) will display a list of supported flags.   main clean. will not build anything, but will remove the _make directory, including the  any 2.   main _make/ henry.txt will not build neil.txt or  emily.txt, but will instead build  henry.txt. o A version of n8 with more flexible handling of command line arguments.  The caller of oI can add additional flags (the second argument) and chose how to convert  the flags/2arguments into rules (the third argument). Given:    o opts flags (\ flagValues argValues -> result)  opts is the initial 0D value, which may have some fields overriden by command line flags.  This argument is usually C', perhaps with a few fields overriden.  flags8 is a list of flag descriptions, which either produce a : containing an error > message (typically for flags with invalid arguments, .e.g. ; "could not parse as int"), or a value  that is passed as  flagValues$. If you have no custom flags, pass [].   flagValues6 is a list of custom flags that the user supplied. If  flags == [] then this list will  be [].   argValuesQ is a list of non-flag arguments, which are often treated as files and passed to b.  result should produce a ^8 to indicate that no building needs to take place, or a _ , providing the rules that should be used. 4As an example of a build system that can use either gcc or distcc for compiling:    data Flags = DiscCC deriving Eq flags = [Option "" ["distcc"] (NoArg $ Right DistCC) "Run distributed."]  main = o C flags $ \$flags targets -> return $ Just $ do  if null targets then b [" result.exe"] else b targets  let compiler = if DistCC `elem` flags then "distcc" else "gcc"  "*.o" f \ out -> do  a ...   compiler ...  ... Now you can pass --distcc to use the distcc compiler. p:A list of command line options that can be used to modify 0. Each option returns a either an error message (invalid argument to the flag) or a function that changes some fields  in 0. The command line flags are make+ compatible where possbile, but additional ? flags have been added for the extra options Shake supports. <2True if it has a potential effect on ShakeOptions =>?@ABCDEnoFGpHI<nop =EDCBA@?>noFGpHI<0Noneq<Define a rule for building multiple files at the same time. ; As an example, a single invokation of GHC produces both .hi and .o files:    ["*.o","*.hi"] q \[o,hi] -> do  let hs = 1 o "hs"  ! ... -- all files the .hs import   "ghc" ["-c",hs] However, in practice, it'&s usually easier to define rules with f and make the .hi depend  on the .o9. When defining rules that build multiple files, all the  values must  have the same sequence of // and * wildcards in the same order. rLDefine a rule for building multiple files at the same time, a more powerful ! and more dangerous version of q. Given an application  test ?>> ..., test should return Just! if the rule applies, and should = return the list of files that will be produced. This list must3 include the file passed as an argument and should  obey the invariant:   test x == Just ys ==> x `elem` ys && all ((== Just ys) . test) ys 7As an example of a function satisfying the invariaint:    test x | 2 x `elem` [".hi",".o"]  = Just [3 x  "hi", 3 x  "o"] test _ = Nothing Regardless of whether Foo.hi or Foo.o( is passed, the function always returns [Foo.hi, Foo.o]. JKLMqrNOPqrJKLMqrNOP4None sZExecute a system command. This function will raise an error if the exit code is non-zero.  Before running s make sure you a any required files. tVExecute a system command with a specified current working directory (first argument). C This function will raise an error if the exit code is non-zero.  Before running t make sure you a any required files. ' systemCwd "/usr/MyDirectory" "pwd" [] u$Execute a system command, returning (stdout,stderr). C This function will raise an error if the exit code is non-zero.  Before running u make sure you a any required files. vcopyFile old new copies the existing file from old to new. The old file is has a called on it  before copying the file. wRead a file, after calling a. xWrite a file, lifted to the D monad. y A version of w* which also splits the result into lines. z A version of x# which writes out a list of lines. {5Write a file, but only if the contents would change. Qstuvwxyz{ stuvwxyz{ Qstuvwxyz{None|A variable arity version of s. }A variable arity version of t. ~A variable arity version of u. =A variable arity function to accumulate a list of arguments. RSTUVWXYZ[\|}~]^_`abcdef|}~|}~RSTUVWXYZ[\|}~]^_`abcdefNonee !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{emCHFGEIJKLDOPQMN0123456789:;<=>?@BAnop !"#$%&)'(*/.-,+URSTVstuvwyxz{_`abfedcrqYZ\]^[ijklWXhgg5675689:;9<=9:>9:?9:@9<A56BCDECDFCDGHIJHIKLMNLMOPQRSTUVWXYZ[\]^^_`abcdefghijklmnopqqr stuvwxyz{|}~   !     ########/$$ $$$$ $$'''*), ...00444(44&4%444+9S59999CDCDCDCDCCCC  9                      ! " # $ % & ' ( ) * + , - 3  1 2 . / 0 1 2 3 4 5 6 7889:;<<==>?@ABCDEFGHIJKLMNOPPQQRSTUVWXYYZ[\]^_5`abcdefghijklmnopqrstuvwxy5z{|}~9999599                                                  # # # # # ######################### #!#"###$#%#&#'#(#)#*#+#,$-$.$.$/$/$0$1$2'3'3'4'4'5*6*6*7*7*8*9*:*;*<9=9>?.@.A.B.C.D.E.F.G.H.I.J.K.L.M0N0N0O0O0P0Q0R4STUVWXYZ[\]^_`abcdefghi shake-0.10Development.Shake.ClassesDevelopment.ShakeDevelopment.Shake.FilePathDevelopment.Shake.SysDevelopment.Shake.ErrorsDevelopment.Shake.Locks newResource withResourceshake shakeOptions shakeThreadswant*>system'need<.>Development.Shake.PoolDevelopment.Shake.Binary Paths_shakeDevelopment.Shake.ReportDevelopment.Shake.ValueDevelopment.Shake.InternDevelopment.Shake.FileTimeDevelopment.Shake.FilePatternDevelopment.Shake.Progress shakeProgressDevelopment.Shake.Typesaction storedValueDevelopment.Shake.StorageDevelopment.Shake.DatabaseDevelopment.Shake.CoreRuleDeveloment.ShakeDevelopment.Shake.DirectoryDevelopment.Shake.File writeFile' readFile'Development.Shake.Oracle systemOutput alwaysRerunDevelopment.Shake.RerunwriteFileChangedDevelopment.Shake.Shake shakeWithArgsDevelopment.Shake.ArgsremoveFilesAfterDevelopment.Shake.FilesreplaceExtension takeExtension dropExtensionDevelopment.Shake.Derivedghc-prim GHC.Classes==EqbaseGHC.ShowShowData.Typeable.InternalTypeableshowListshow showsPrectypeOf/=binary-0.5.1.1 Data.BinarygetputBinarydeepseq-1.3.0.1Control.DeepSeqrnfNFDatahashable-1.2.0.5Data.Hashable.Class hashWithSaltHashabletransformers-0.3.0.0Control.Monad.IO.ClassliftIOResource newResourceIOdropDirectory1takeDirectory1 normalisetoNativecombineexe FilePattern?==Progress isRunning countSkipped countBuilt countUnknown countTodo timeSkipped timeBuilt timeUnknowntimeTodoprogressDisplayprogressTitlebarprogressSimple Verbosity DiagnosticLoudNormalQuietSilent ShakeOptions shakeFiles shakeVersionshakeVerbosity shakeStaunch shakeReport shakeLintshakeDeterministic shakeFlush shakeAssumeshakeAbbreviationsshakeStorageLog shakeOutputAssume AssumeClean AssumeDirtyActionRules ShakeValue defaultRulerulewithoutActionsactionOnException actionFinallyapplyapply1tracedputLoud putNormalputQuiet getVerbosityquietly doesFileExistdoesDirectoryExistgetEnvgetDirectoryContentsgetDirectoryFilesgetDirectoryDirs removeFilesphony?>**> newCacheIOnewCache addOracle askOracle askOracleWith shakeArgs shakeArgsWithshakeOptDescrs*>>?>> systemCwd copyFile' readFileLineswriteFileLinessyssysCwd sysOutputargsShakeExceptionerr alternatives structured structured_errorNoRuleToBuildTypeerrorRuleTypeMismatcherrorIncompatibleRuleserrorMultipleRulesMatcherrorRuleRecursionerrorDuplicateOracleisOracle$fShowShakeException$fExceptionShakeExceptionGHC.MVarMVarBarrierVarLockacquireResourcereleaseResourcenewLockwithLocknewVarreadVar modifyVar modifyVar_withVar newBarrier signalBarrier waitBarrier$fShowResource $fShowBarrier $fShowVar $fShowLockstepaddPool blockPoolrunPoolSthreadsworkingblockedtodoPoolTreeBranchLeafQueueNonDetnonDetnewQueueenqueuePriorityenqueuedequeue insertTree removeTreeemptyS BinaryWithputWithgetWith$fBinaryWithctxMaybe$fBinaryWithctx[]$fBinaryWithctx(,) GHC.TypesWordGHC.WordWord8Word16Word32Word64 decodeFile encodeFiledecodeencodeData.Binary.PutputWord8PutData.Binary.GetgetWord8GetcatchIOversionbindirlibdirdatadir libexecdir getBinDir getLibDir getDataDir getLibexecDirgetDataFileName buildReport runTemplateGHC.IOFilePathfilepath-1.3.0.1System.FilePath.Posix makeRelative isAbsolute isRelative makeValidisValid equalFilePathjoinPathsplitDirectories splitPathreplaceDirectory takeDirectorydropTrailingPathSeparatoraddTrailingPathSeparatorhasTrailingPathSeparatorreplaceBaseName takeBaseName takeFileName dropFileNamereplaceFileName splitFileNameisDrivehasDrive dropDrive takeDrive joinDrive splitDrivetakeExtensionsdropExtensionssplitExtensions hasExtension addExtensionsplitExtension getSearchPathsplitSearchPathisExtSeparator extSeparatorisSearchPathSeparatorsearchPathSeparatorisPathSeparatorpathSeparators pathSeparatorWitness typeNames witnessIn witnessOutValueKeynewKeynewValuetypeKey typeValuefromKey fromValuewitnessregisterWitness toStableListcurrentWitness$fBinaryWithWitnessValue$fBinaryWitness $fEqWitness $fEqValue$fHashableValue $fNFDataValue $fShowValue $fShowKeyIdInternemptyinsertaddlookuptoListfromList$fBinaryWithwIdFileTimefileTime fileTimeNonegetModTimeMaybegetModTimeErrormatch directories1True directories compatibleextract substituteSStringRegexEmptyRepeatConcatOrBracketEndStartAnyNotLitLexemeChar SlashSlashStarisCharisDullfromCharlexerpatternFalse progressTodo progressDonexterm$fMonoidProgressFunction Data.DataData Data.MaybeNothingJust System.IOputStrLnBS fromFunctionfieldsShakeOptionstyShakeOptionsconShakeOptionsunhide tyFunctionpackunpackpack_unpack_ $fNFDataBS$fDataFunction$fShowFunction$fShowShakeOptions$fDataShakeOptionsasyncExceptionMapdatabaseVersion withStorage flushThread readChunkstoChunk showExceptionstoredexecuteDatabase startTimebuilddependencyOrder resultsOnlyStepKeyOpsDepends fromDependsWaitingPendingResultresultbuiltchangeddepends executiontracesStatusMissingLoadedErrorReadylockinternstatusjournal diagnosticassumeTraceStackTimeDurationStepincStepdurationwhenJust showStackaddStacktopStack checkStack emptyStack statusTypeisError isWaitingisReady afterWaiting newWaiting runWaitingwaitFor getResultprogressshowJSON checkValidstepKey toStepResultfromStepResult withDatabase$fBinaryWithWitnessStatus$fBinaryWithWitnessResult$fBinaryWithWitnessStep $fShowPendingIO Data.MonoidMonoidGHC.BaseMonad rulePriorityrun withVerbositySActiondatabasepool timestampruleinfooutput verbositylintafterstackdiscountRuleInfo resultTypeSRulesactionsrulesARuleruleKey ruleValuerulesIOnewRules modifyRulesgetRules abbreviate wrapStackregisterWitnessescreateRuleinfo runStored runExecute runActionrunAfter applyKeyValueputWhen $fMonoidRules$fMonoidSRulesdefaultRuleDirectory GetDirectoryA GetDirectoryQ GetDirDirs GetDirFilespatGetDirdirGetEnvAGetEnvQDoesDirectoryExistADoesDirectoryExistQDoesFileExistADoesFileExistQgetEnvIO getDirActioncontentsanswergetDir concatMapM partitionM $fRuleGetDirectoryQGetDirectoryA$fRuleGetEnvQGetEnvA,$fRuleDoesDirectoryExistQDoesDirectoryExistA"$fRuleDoesFileExistQDoesFileExistA$fBinaryGetDirectoryQ$fHashableGetDirectoryQ$fNFDataGetDirectoryQ$fShowGetDirectoryQ $fShowGetEnvA $fShowGetEnvQ$fShowDoesDirectoryExistA$fShowDoesDirectoryExistQ$fShowDoesFileExistA$fShowDoesFileExistQdefaultRuleFileFileAFileQroot$fRuleFileQFileA $fShowFileQOracleAOracleQ$fRuleOracleQOracleA AlwaysRerunA AlwaysRerunQdefaultRuleRerun$fRuleAlwaysRerunQAlwaysRerunA$fEqAlwaysRerunA$fShowAlwaysRerunA$fShowAlwaysRerunQString Data.EitherLeft shakeOptsExExtraSleepHelpColorPrintDirectory AssumeOld AssumeNewVersionChangeDirectory showOptDescr fmapOptDescrunescapeescapeFilesAFilesQ getFileTimes$fRuleFilesQFilesA $fShowFilesQ checkExitCodeArgarg ArgsArgumentsargs_SysOutputArguments sysOutput_SysCwdArgumentssysCwd_ SysArgumentssys_:->$fArg[]$fArg[]0$fArgsArguments[]$fArgsArguments(->)$fSysOutputArgumentsAction$fSysOutputArguments(->)$fSysCwdArgumentsAction$fSysCwdArguments(->)$fSysArgumentsAction$fSysArguments(->)