_T      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~NoneTA 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 ) should be run inside ,  not commands such as 0. If an action requires multiple resources, use   to avoid deadlock. ^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 None<Print all withTiming information and clear the information.  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 . ;Remove the current extension and add another, 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. 6      !"#$%&'()*+,-./01None  None 23456789:;<246789:; 23456789:;<None=>?@AB=@AB=>?@AB Safe-Inferred-A type synonym for file patterns, containing // and *. For the syntax  and semantics of  see . C$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" D?Given a pattern, return the directory that requires searching,  with E: 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) FNGiven a set of patterns, produce a set of directories that require searching,  with ED 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)] GDo they have the same * and  counts in the same order HEExtract the items that match the wildcards. The pair must match with . IGiven the result of H, substitute it back in to a G pattern. / p '?==' x ==> substitute (extract p x) p == x JKLMNOPQRSTUVWXYZ[\]^CDFGHIDFGHIJK UTSRQPONMLVYXWZ[\]^CDFGHINone_A stream of values ZInformation 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 E , becomes ` once the build has completed.  Starts out a , becomes b if a rule fails. !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). )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  1m25s (15%), indicating that the build x is predicted to complete in 1 minute 25 seconds (85 seconds total), 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,  roughly done / time_elapsed. c Version of ) that omits the sleep *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 * !_de !"#$%&'(fghijklmn)cop*+qrs !"#$%&'()c*+_de  !"#$%&'(fghijklmn)cop*+qrs Safe-Inferred,<Error representing all expected exceptions thrown by Shake. L Problems when executing rules will be raising using this exception type. .<The target that was being built when the exception occured. / The stack of targets, where the . is last. 0*The underlying exception that was raised. ,-./0tuvwxyz{|}~ ,-./0txyz{|,-./0tuvwxyz{|}~None NoneNone1!The verbosity data type, used by =. 2@Print messages for virtually everything (mostly for debugging). 3JPrint errors, full command line and status messages when starting a rule. 43Print errors and full command lines when running a   command. 5Print errors and #  command-name  file-name when running a ! command. 61Only print essential messages, typically errors. 7Don't print any messages. ,Internal type, copied from Hide in Uniplate 8UOptions to control the execution of Shake, usually specified by overriding fields in  M:   M{;=4, ?=Just " report.html"}The $ instance for this type reports the G and H$ fields as having the abstract type ,  because " cannot be defined for functions. : Defaults to .shakeD. The prefix of the filename used for storing Shake metadata files. $ All metadata files will be named :. extension , for some  extension. ; 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. < 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. = Defaults to 50. What level of messages should be printed out. > Defaults to `G. Operate in staunch mode, where building continues even after errors,  similar to make --keep-going. ? Defaults to a:. 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. @ Defaults to `N. 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. A Defaults to b 109. How often to flush Shake metadata files in seconds, or a to never flush explicitly. m It is possible that on abnormal termination (not Haskell exceptions) any rules that completed in the last  A seconds will be lost. B Defaults to a$. Assume all build objects are clean/ dirty, see I for details.  Can be used to implement  make --touch. C 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). D Defaults to `. Write a message to :.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. E Defaults to E . Change stdout and stderr( to line buffering while running Shake. F Default to `6. Print timing information for each stage at the end. GwDefaults 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. HDefaults to writing using B. A function called to output messages from Shake, along with the 1 at ` which that message should be printed. This function will be called atomically from all other H functions.  The 1, will always be greater than or higher than =. I:The current assumptions made by the build system, used by B. 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. JNThis assumption is unsafe, and may lead to incorrect build results in this run. m Assume that all rules reached are clean in this run. Only useful for benchmarking, to remove any overhead  from running # operations. KbThis assumption is unsafe, and may lead to incorrect build results in this run, and in future runs. g Assume and record 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. LNAssume that all rules reached are dirty and require rebuilding, equivalent to # always  returning a . Useful to undo the results of K%, for benchmarking rebuild speed and a for rebuilding if untracked dependencies have changed. This assumption is safe, but may cause # more rebuilding than necessary. MThe default set of 8. 0123456789:;<=>?@ABCDEFGHIJKLM. !"#$%&'(123456789:;<=>?@ABCDEFGHIJKLM176543289:;<=>?@ABCDEFGHILKJM$None$Is the exception asyncronous, not a  coding error that should be ignored Storage options Logging function Witness Execute %None[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 L/&NoneNThe N monad, use  to raise  actions into it, and  to execute files.  Action values are used by T and U. O:Define a set of rules. Rules can be created with calls to T, S or U. Rules are combined  with either the " instance, or (more commonly) the   instance and do notation. P8Define a pair of types that can be used by Shake rules. / To import all the type classes required see Development.Shake.Classes. Q Retrieve the value associated with a key, if available. As an example for filenames/1timestamps, if the file exists you should return b ' the timestamp, but otherwise return a!. For rules whose values are not  stored externally, Q should return a. RODefine 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) SLike T, but lower priority, if no T exists then S is checked. ' All default rules must be disjoint. T4Add a rule to build a key, returning an appropriate N. All rules must be disjoint. & To define lower priority rules use S.  TAdd a rule at a given priority, higher numbers correspond to higher-priority rules.  The function S is priority 0 and T& is priority 1. All rules of the same  priority must be disjoint. UCRun an action, usually used for specifying top-level requirements. VNRemove all actions specified in a set of rules, usually used for implementing 0 command line specification of what to build. W!If an exception is raised by the N, perform some . X After an N, perform some !, even if there is an exception.  /Internal main function (not exported publicly) YaExecute 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 T or S. Z+Apply a single rule, equivalent to calling Y( with a singleton list. Where possible,  use Y to allow parallelism. [7Write an action to the trace list, along with the start/#end time of running the IO action.  The ( and () functions automatically call [. 3 The trace list is used for profile reports (see ?). \2Write a message to the output when the verbosity (=) is appropriate. D The output will not be interleaved with any other Shake messages 4 (other than those generated by system commands). ]2Write a message to the output when the verbosity (=) is appropriate. D The output will not be interleaved with any other Shake messages 4 (other than those generated by system commands). ^2Write a message to the output when the verbosity (=) is appropriate. D The output will not be interleaved with any other Shake messages 4 (other than those generated by system commands). _+Get the current verbosity level, as set by = . If you I want to output information to the console, you are recommended to use  \ / ] / ^&, which ensures multiple messages are  not interleaved.  1Run an action with a particular verbosity level. `Run an action with 6/ verbosity, in particular messages produced by [  (including from  or )%) will not be printed to the screen. alCreate a new finite resource, given a name (for error messages) and a quantity of the resource that exists.  For an example see . bGRun an action which uses part of a finite resource. For an example see . c^Run an action which uses part of several finite resources. Acquires the resources in a stable [ order, to prevent deadlock. If all rules requiring more than one resource acquire those # resources with a single call to c, resources will not deadlock. IN  !"#$%O&'(PQR)*+,-.ST UVWX /012345678Y9Z[:\]^_ `abc;<NOPQR+STUVWX 8YZ[\]^_`abc0N  !"#$%O&'(PQR)*+,-.ST UVWX /012345678Y9Z[:\]^_ `abc;<NonedHA class for specifying what results you want to collect from a process.  Values are formed of k, h, e and tuples of those. e Collect the = of the process. , If you do not collect the exit code, any > will cause an exception. h Collect the stderr of the process.  If you are collecting the stderr<, it will not be echoed to the terminal, unless you include o. k Collect the stdout of the process.  If you are collecting the stdout<, it will not be echoed to the terminal, unless you include p. nOptions passed to x or z( to control how processes are executed. oShould I echo the stderr? Defaults to E unless a h result is required. pShould I echo the stdout? Defaults to E unless a k result is required. qShould I include the stderr4 in the exception if the command fails? Defaults to E. rName to use with [, or ""E for no tracing. By default traces using the name of the executable. s Treat the stdin/stdout/stderr; messages as binary. By default streams use text encoding. tPass the command to the shell without escaping - any arguments will be joined with spaces. By default arguments are escaped properly. u Given as the stdin' of the spawned process. By default no stdin is given. veChange the environment variables in the spawned process. By default uses this processes environment. wgChange the current directory in the spawned process. By default uses this processes current directory. x)Execute a system command. Before running x make sure you  any files % that are required by the command. 2This function takes a list of options (often just [], see n for the available Q options), the name of the executable (either a full name, or a program on the $PATH) and , a list of arguments. The result is often ()%, but can be a tuple containg any of k,  h and e. Some examples:    y [] "gcc" ["-c","myfile.c"]N -- compile a file, throwing an exception on failure  e c <- x [] "gcc" ["-c",myfile]? -- run a command, recording the exit code  (e c, h err) <- x [] "gcc" ["-c","myfile.c"]> -- run a command, recording the exit code and error output  k out <- x [] "gcc" ["-MM","myfile.c"]3 -- run a command, recording the output  y [w " generated"] "gcc" ["-c",myfile]/ -- run a command in a directory Unless you retrieve the = using e, any > will throw an error, including  the h. in the exception message. If you capture the k or h1, that stream will not be echoed to the console,  unless you use the option p or o.  If you use x inside a doO block and do not use the result, you may get a compile-time error about being  unable to deduce d. To avoid this error, use y. y A version of xO where you do not require any results, used to avoid errors about being unable  to deduce d. zA variable arity version of x.  String: arguments are treated as whitespace separated arguments.  [String]- arguments are treated as literal arguments.  n arguments are used as options. To take the examples from x:    () <- z "gcc -c myfile.c"V -- compile a file, throwing an exception on failure  e c <- z "gcc -c" [myfile]H -- run a command, recording the exit code  (e c, h err) <- z "gcc -c myfile.c"K -- run a command, recording the exit code and error output  k out <- z "gcc -MM myfile.c"@ -- run a command, recording the output  z (w " generated") "gcc -c" [myfile] :: N, () -- run a command in a directory #When passing file arguments we use [myfile] so that if the myfile5 variable contains spaces they are properly escaped.  If you use z inside a doO block and do not use the result, you may get a compile-time error about being  unable to deduce d*. To avoid this error, bind the result to (), or include a type signature. 2?@ABCdDefghijklmEFGHnopqrstuvwIJKLxyzMNOPQRSTUVWXYdefghijklmnopqrstuvwxyzxyzklmhijefgdnwvutsrqpo?@ABCdDefghijklmEHGFn wvutsrqpoIJKLxyzMNOPQRSTUVWXY*None ZMThis function is not actually exported, but Haddock is buggy. Please ignore. {Returns E if the file exists. |Returns E if the directory exists. }Return b+ the value of the environment variable, or a  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"] ?If you require a qualified file name it is often easier to use "" as  argument, = for example the following two expressions are equivalent: D fmap (map ("Config" </>)) (getDirectoryFiles "Config" ["//*.xml"]) ( getDirectoryFiles "" ["Config//*.xml"] 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 action for your build system,  often as a phony rule. 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[\]^_`abcdefghijklmnZ{|}o~pqrstuvwxyz{|}~ Z{|}~&[\]a_^bb`bcdefghijklmnZ{|}o~pqrstuvwxyz{|}~+None MThis function is not actually exported, but Haddock is buggy. Please ignore. KRequire that the following files are built before continuing. Particularly  necessary when calling  or ). As an example:   "//*.rot13"  \ out -> do  let src = , out   [src]   "rot13" [src] "-o" [out] ORequire that the following are built by the rules, used to specify the target.    main =   M $ do   ["Main.exe"]  ... This program will build Main.exe, given sufficient rules. ZDeclare 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  rules using  / . PPhony actions are intended to define command-line abbreviations. You should not  phony actions F as dependencies of rules, as that will cause excessive rebuilding. <Define a rule to build files. If the first argument returns E for a given file, 9 the second argument will be used to build it. Usually  is sufficient, but  gives X additional power. For any file used by the build system, only one rule should return E.   (all isUpper . -)  \ out -> do  let src = .& out $ map toLower $ takeBaseName out  / out . map toUpper =<< 0 src QDefine a set of patterns, and if any of them match, run the associated rule. See . Define 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"  \ out -> do  let src = , out   [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.  A version of 3 that runs in IO, and can be called before calling  .  Most people should use  instead. pGiven 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 D creates a separate cache that is independent of all other calls to . 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 <-  $ \ file -> do  src <- readFile file * return $ length $ filter isDigit src  "*.digits"  \x -> do  v1 < - digits ( dropExtension x)  v2 < - digits ( dropExtension 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.  1None1Add 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)  rules = do   $ \'(GhcVersion _) -> fmap (last . words . 2) $  " ghc --version"  ... rules ... If a rule calls  (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 ( must use a different type of question.  Actions passed to / 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 3.  If the value returned by  is ignored then ) may help avoid ambiguous type messages. $ Alternatively, use the result of  , which is ! 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)   rules = do  getPkgList <-  $ \GhcPkgList{} -> do  Stdout out <-  "ghc-pkg list --simple-output" + return [(reverse b, reverse a) | x <%- words out, let (a,_:b) = break (== '-' ) $ reverse x]  --  getPkgVersion <-  $ \(GhcPkgVersion pkg) -> do  pkgs <- getPkgList $ GhcPkgList () ! return $ lookup pkg pkgs  --  "myrule" *> \_ -> do & getPkgVersion $ GhcPkgVersion "shake" - ... rule using the shake version ... >Using these definitions, any rule depending on the version of shake  should call getPkgVersion $ GhcPkgVersion "shake" to rebuild when shake is upgraded. &Get information previously added with . The question/'answer types must match those provided  to . &Get information previously added with +. The second argument is not used, but can M be useful to fix the answer type, avoiding ambiguous type error messages. 4NoneIAlways rerun the associated action. Useful for defining rules that query ! the environment. For example:   "ghcVersion.txt"   \ out -> do    Stdout stdout <-  " ghc --version"  5 out stdout  6None[Main entry point for running Shake build systems. For an example see the top of the module Development.Shake.  Use 8% to specify how the system runs, and O3 to specify what to build. The function will throw $ an exception if the build fails. $To use command line flags to modify 8 see 7. 8NoneCRun a build system using command line arguments for configuration. & The available flags are those from , along with a few additional  make. compatible flags that are not represented in 8 , such as --print-directory. + If there are no file arguments then the O1 are used directly, otherwise the file arguments  are ed (after calling V). As an example:    main =  M{: = "_make/", G = +} $ do   "clean" $ 9 "_make" ["//*"]   ["_make/neil.txt","_make/ emily.txt"]  "_make/*.txt"  \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 :.   main _make/ henry.txt will not build neil.txt or  emily.txt, but will instead build  henry.txt.  A version of 8 with more flexible handling of command line arguments.  The caller of I can add additional flags (the second argument) and chose how to convert  the flags/2arguments into rules (the third argument). Given:     opts flags (\ flagValues argValues -> result)  opts is the initial 8D value, which may have some fields overriden by command line flags.  This argument is usually M', 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 .  result should produce a a8 to indicate that no building needs to take place, or a b , providing the rules that should be used. 4As an example of a build system that can use either gcc or distcc for compiling:   import System.Console.GetOpt   data Flags = DistCC deriving Eq flags = [Option "" ["distcc"] (NoArg $ Right DistCC) "Run distributed."]  main =  M flags $ \$flags targets -> return $ Just $ do  if null targets then  [" result.exe"] else  targets  let compiler = if DistCC `elem` flags then "distcc" else "gcc"  "*.o"  \ out -> do   ...  cmd compiler ...  ... Now you can pass --distcc to use the distcc compiler. :A list of command line options that can be used to modify 8. Each option returns a either an error message (invalid argument to the flag) or a function that changes some fields  in 8. 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   :None<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"]  \[o,hi] -> do  let hs = o ; "hs"  ! ... -- all files the .hs import   "ghc -c" [hs] However, in practice, it'&s usually easier to define rules with  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. LDefine a rule for building multiple files at the same time, a more powerful ! and more dangerous version of . 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:  U forAll $ \x ys -> test x == Just ys ==> x `elem` ys && all ((== Just ys) . test) ys 7As an example of a function satisfying the invariaint:    test x | < x `elem` [".hi",".o"]  = Just [, x  "hi", , x  "o"] test _ = Nothing Regardless of whether Foo.hi or Foo.o( is passed, the function always returns [Foo.hi, Foo.o]. =None ZExecute a system command. This function will raise an error if the exit code is non-zero.  Before running  make sure you  any required files.  Deprecated: Please use command or cmd instead, with Cwd. 6 This function will be removed in a future version. VExecute 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  make sure you  any required files.    "/usr/ MyDirectory" "pwd" []  Deprecated: Please use command or cmd instead, with Stdout or Stderr. 6 This function will be removed in a future version. $Execute a system command, returning (stdout,stderr). C This function will raise an error if the exit code is non-zero.  Before running  make sure you  any required files. copyFile' old new copies the existing file from old to new. The old file is has  called on it  before copying the file. Read a file, after calling . Write a file, lifted to the N monad.  A version of * which also splits the result into lines.  A version of # which writes out a list of lines. 5Write a file, but only if the contents would change.   NoneA variable arity version of . A variable arity version of . A variable arity version of . =A variable arity function to accumulate a list of arguments. None !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~MRPQOSTUVNYZ[WX,-./089:;<=>?@ABCDEFGHILKJ !"#$%&'(+)*1765432_\]^`xyzklmhijefgdnwvutsrqpo{|~}abc>?@>?ABCDBEFBCGBCHBCIBEJ>?KLMNLMOLMPQRSQRTUVWUVXYZ[\]^_`ab;cdefgghijklmnopqrstuuvwxyz{|}~  &&&'&#&&&&"&&&&&&!&&&&&&&&2)********9++ ++++ ++111436 8788::= ====0=/===5B\> B  B  B  B LMLMLMLMLLLL !"#$%&'()*+,-B./01201301401501601701801901:01;01<01=01>01?01@01.01-01A01B01C01D01E01F01G01H01I01J01K01L01M01N01O01,0101<01P01Q01R01S01T01U01V01W01X01YZZ[[\]^_`abccdefghi>jklmnopqrstuvwxyz{|}~>BBBB$$$$$$$$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % %%%%%%%%%%%%%%%%>B B!"&#&$&%&&&&&&'&(&)&*&+&,&&-&.&/&&0&&1&1&&&2&3&3&4&5&&6&6&7&8&9&:&;&<&=&>&?&@&A&B&C&D&E&F&G&H&I&JBKLBKMNOPQRSTUVWXYZ[\]^_`abcdefg*h*i*i*j*k*l*m*n*o*p*p*q*q*r*r*s*s*t*t*u*u*v*w*x*y*z*{*|*}*~************++++++++11111444444444B!B8888888888888888:::::::=NOR[] shake-0.10.6Development.Shake.ClassesDevelopment.ShakeDevelopment.Shake.FilePathDevelopment.Shake.CommandDevelopment.Shake.SysDevelopment.Shake.Locks newResource withResourceshake shakeOptions shakeThreadswant*>cmdneed withResources<.>Development.Shake.PoolDevelopment.Shake.BinaryDevelopment.Shake.Timing Paths_shakeDevelopment.Shake.ReportDevelopment.Shake.InternDevelopment.Shake.FileTimeDevelopment.Shake.FilePatternDevelopment.Shake.Progress shakeProgressDevelopment.Shake.ErrorsDevelopment.Shake.ValueDevelopment.Shake.SpecialDevelopment.Shake.Typessystem'tracedaction storedValueDevelopment.Shake.StorageDevelopment.Shake.DatabaseDevelopment.Shake.CoreRuleDeveloment.ShakecommandDevelopment.Shake.DirectoryDevelopment.Shake.File dropExtension takeBaseNamereplaceBaseName writeFile' readFile'Development.Shake.Oracle fromStdout alwaysRerunDevelopment.Shake.RerunwriteFileChangedDevelopment.Shake.Shake shakeArgsDevelopment.Shake.ArgsremoveFilesAfterDevelopment.Shake.Files-<.> takeExtensionDevelopment.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.10Data.Hashable.Class hashWithSaltHashabletransformers-0.3.0.0Control.Monad.IO.ClassliftIOResource newResourceIOdropDirectory1takeDirectory1 normalisetoNativecombineexe FilePattern?==Progress isRunning isFailure countSkipped countBuilt countUnknown countTodo timeSkipped timeBuilt timeUnknowntimeTodoprogressDisplayprogressTitlebarprogressSimpleShakeExceptionshakeExceptionTargetshakeExceptionStackshakeExceptionInner Verbosity DiagnosticChattyLoudNormalQuietSilent ShakeOptions shakeFiles shakeVersionshakeVerbosity shakeStaunch shakeReport shakeLint shakeFlush shakeAssumeshakeAbbreviationsshakeStorageLogshakeLineBuffering shakeTimings shakeOutputAssume AssumeSkip AssumeClean AssumeDirtyActionRules ShakeValue defaultRulerulewithoutActionsactionOnException actionFinallyapplyapply1putLoud putNormalputQuiet getVerbosityquietly CmdResultExitfromExitStderr fromStderrStdout CmdOption EchoStderr EchoStdout WithStderrTraced BinaryPipesShellStdinEnvCwdcommand_ doesFileExistdoesDirectoryExistgetEnvgetDirectoryContentsgetDirectoryFilesgetDirectoryDirs removeFilesphony?>**> newCacheIOnewCache addOracle askOracle askOracleWith shakeArgsWithshakeOptDescrs*>>?>> systemCwd systemOutput copyFile' readFileLineswriteFileLinessyssysCwd sysOutputargsGHC.MVarMVarBarrierVarLockacquireResourcereleaseResource resourceKey resourceName resourceMax resourceVarnewLockwithLocknewVarreadVar modifyVar modifyVar_withVar newBarrier signalBarrier waitBarrier resourceIds resourceId $fOrdResource $fEqResource$fShowResource $fShowBarrier $fShowVar $fShowLockstepaddPool blockPoolrunPoolSthreadsworkingblockedtodoPoolTreeBranchLeafQueueNonDetnonDetnewQueueenqueuePriorityenqueuedequeue insertTree removeTreeemptyS BinaryWithputWithgetWith$fBinaryWithctxMaybe$fBinaryWithctx[]$fBinaryWithctx(,) GHC.TypesWordGHC.WordWord8Word16Word32Word64 decodeFile encodeFiledecodeencodeData.Binary.PutputWord8PutData.Binary.GetgetWord8Get printTimingstimings resetTimings addTiming showTimingsshowGapshowDPcatchIOversionbindirlibdirdatadir libexecdir getBinDir getLibDir getDataDir getLibexecDirgetDataFileName buildReport runTemplatelbs_stripPrefixGHC.IOFilePathfilepath-1.3.0.1System.FilePath.PosixreplaceExtension makeRelative isAbsolute isRelative makeValidisValid equalFilePathjoinPathsplitDirectories splitPathreplaceDirectory takeDirectorydropTrailingPathSeparatoraddTrailingPathSeparatorhasTrailingPathSeparator takeFileName dropFileNamereplaceFileName splitFileNameisDrivehasDrive dropDrive takeDrive joinDrive splitDrivetakeExtensionsdropExtensionssplitExtensions hasExtension addExtensionsplitExtension getSearchPathsplitSearchPathisExtSeparator extSeparatorisSearchPathSeparatorsearchPathSeparatorisPathSeparatorpathSeparators pathSeparatorIdInternemptyinsertaddlookuptoListfromList$fBinaryWithwIdFileTimefileTime fileTimeNonegetModTimeMaybegetModTimeErrormatch directories1True directories compatibleextract substituteSStringRegexEmptyRepeatConcatOrBracketEndStartAnyNotLitLexemeChar SlashSlashStarisCharisDullfromCharlexerpatternStreamFalse Data.MaybeNothingJustprogressDisplayTester runStreamidStream oldStreamiff foldStream posStreamfromIntdecaylatchmessageprogressDisplayerxterm$fApplicativeStream$fFunctorStream$fMonoidProgresserr alternatives structured structured_errorNoRuleToBuildTypeerrorRuleTypeMismatcherrorIncompatibleRuleserrorMultipleRulesMatcherrorRuleRecursionerrorDuplicateOraclespecialIsOracleKey$fShowShakeException$fExceptionShakeExceptionWitness typeNames witnessIn witnessOutValueKeynewKeynewValuetypeKey typeValuefromKey fromValuewitnessregisterWitness toStableListcurrentWitness$fBinaryWithWitnessValue$fBinaryWitness $fEqWitness $fEqValue$fHashableValue $fNFDataValue $fShowValue $fShowKeyspecialAlwaysRebuildsspecialIsFileKeyFunction Data.DataData 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 getResultprogress removeStepshowJSON checkValidstepKey toStepResultfromStepResult withDatabase$fBinaryWithWitnessStatus$fBinaryWithWitnessResult$fBinaryWithWitnessStep $fShowPendingIO Data.MonoidMonoidGHC.BaseMonad rulePriorityrun withVerbositySActiondatabasepool timestampruleinfooutput verbositylintafterstackdiscountRuleInfo resultTypeSRulesactionsrulesARuleruleKey ruleValuerulesIOnewRules modifyRulesgetRuleswithCapabilities lineBuffering abbreviate wrapStackregisterWitnessescreateRuleinfo runStored runExecute runActionrunAfter applyKeyValueputWhen $fMonoidRules$fMonoidSRulesGHC.IO.ExceptionExitCode ExitFailureArgarg CmdArguments cmdArguments:-> cmdResult ResultCode ResultStderr ResultStdoutcommandExplicitforkWaitsaneCommandForUser cmdResultWith$fArg[]$fArgCmdOption$fArg[]0$fArg[]1$fCmdArgumentsAction$fCmdArguments(->)$fCmdResult(,,)$fCmdResult(,) $fCmdResult()$fCmdResultStderr$fCmdResultStdout$fCmdResultExitCode$fCmdResultExitdefaultRuleDirectory 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 shakeOptsExExtra ExceptionNoTimeSleepHelpColorPrintDirectory AssumeOld AssumeNewVersionChangeDirectory showOptDescr fmapOptDescrunescapeescapeFilesAFilesQ getFileTimes$fRuleFilesQFilesA $fShowFilesQ checkExitCode ArgsArgumentsargs_SysOutputArguments sysOutput_SysCwdArgumentssysCwd_ SysArgumentssys_$fArgsArguments[]$fArgsArguments(->)$fSysOutputArgumentsAction$fSysOutputArguments(->)$fSysCwdArgumentsAction$fSysCwdArguments(->)$fSysArgumentsAction$fSysArguments(->)