! E      !"#$%&'()*+,-./0123456789:;<=>?@ABCD Safe-Inferred EFGHIJKLMNOFKLMNO EFGHIJKLMNONonePQRSPRSPQRS Safe-InferredT1Generates an HTML report given some build system " profiling data in JSON format. UETemplate 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 TUTTU Safe-InferredVThe type representing a finite resource, which multiple build actions should respect.  Created with  in the V monad before calling ,  and used with  in the   monad  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:    do excel <-  "Excel" 1    {  =2} $ do    ["a.xls","b.xls"]  "*.xls"   \out ->   excel 1 $   "excel" [out,...] Now the two calls to excel$ will not happen in parallel. Using   is better than WL 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:   do disk <-  "Disk" 4    {  =8} $ do    [show i  "exe" | i < - [1..100]]  "*.exe"   \out ->   disk 1 $   "ld" ["-o",out,...]  "*.o"   \out ->   "cl" ["-o",out,...] X.Starts out empty, then is filled exactly once Y&Like an MVar, but must always be full ZLike an MVar, but has no value lCreate a new finite resource, given a name (for error messages) and a quantity of the resource that exists.  For an example see . [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. ]X^Y_Z`abcdefghi[\jklmXYZabcdefghi[\]X^Y_Z`abcdefghi[\jklmNonenHGiven a pool, and a function that breaks the S invariants, restore them 2 They are only allowed to touch working or todo oAdd a new task to the pool pEA 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. q<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. rstuvwxyz{|}~nopqxopqrstuvwxyz|{}~nopq Safe-InferredNone None$Is the exception asyncronous, not a  coding error that should be ignored Logging function File prefix to use User supplied version number Witness Execute None  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 G      +      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" 4 !"#$%&'()*+,-./0123456789:;<=> 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" @Do they have the same * and  counts in the same order AEExtract the items that match the wildcards. The pair must match with  . BGiven the result of A, substitute it back in to a @ pattern. / p '?==' x ==> substitute (extract p x) p == x CDEFGHIJKLMNOPQR STU? @AB @AB CD NMLKJIHGFEORQP STU? @ABNone# The   monad, use  to raise V actions into it, and need to execute files.  Action values are used by ! and ". :Define a set of rules. Rules can be created with calls to !,   or ". Rules are combined  with either the V" instance, or (more commonly) the W instance and do notation. 8Define a pair of types that can be used by Shake rules. !Given that the database contains key/value., does that still match the on-disk contents? As an example for filenames/?timestamps, if the file exists and had the same timestamp, you  would return X, but otherwise return Y,. For rule values which are not also stored  on disk,  should always return X. !The verbosity data type, used by . 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. ZiAll foreseen exception conditions thrown by Shake, such problems with the rules or errors when executing 4 rules, will be raised using this exception type. UOptions to control the execution of Shake, usually specified by overriding fields in  :  {=4, =Just " report.html"}@Where shall I store the database and journal files (defaults to .shake). JWhat is the maximum number of rules I should run in parallel (defaults to 1). 6 To enable parallelism you may need to compile with  -threaded. ]What is the version of your build system, increment to force a complete rebuild (defaults to 1). (What messages to print out (defaults to ). QOperate in staunch mode, where building continues even after errors (defaults to Y). .Produce an HTML profiling report (defaults to [). 8Perform basic sanity checks after building (defaults to Y). 9Build files in a deterministic order, as far as possible The default set of . Like !, but lower priority, if no ! exists then   is checked. ' All default rules must be disjoint. !4Add a rule to build a key, returning an appropriate  . All rules must be disjoint. & To define lower priority rules use  . \TAdd a rule at a given priority, higher numbers correspond to higher-priority rules.  The function   is priority 0 and !& is priority 1. All rules of the same  priority must be disjoint. "CRun an action, usually used for specifying top-level requirements. #NRemove all actions specified in a set of rules, usually used for implementing 0 command line specification of what to build. ]/Internal main function (not exported publicly) $aExecute 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 ! or  . %+Apply a single rule, equivalent to calling $( with a singleton list. Where possible,  use $ to allow parallelism. &7Write an action to the trace list, along with the start/#end time of running the IO action.  The  command automatically calls &-. 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. +GRun an action which uses part of a finite resource. For an example see . I ^_`abcdefghijkl mnopqr Zstuv !\"#]wxyz{$|%&}'()*+~$  !"#]$%&'()*+& ^_ `abcdefghijkl mnopqr Zs tuv !\"#]wxyz{$|%&}'()*+~NoneMThis function is not actually exported, but Haddock is buggy. Please ignore. ,Returns X if the file exists. -QGet the contents of a directory. The result will be sorted, and will not contain  the files . or ..@ (unlike the standard Haskell version). It is usually better to  call either . or /'. The resulting paths will be relative  to the first argument. .>Get the files in a directory that match a particular pattern. - For the interpretation of the pattern see  . /?Get the directories contained by a directory, does not include . or ... ,-./,-./,-./NoneMThis function is not actually exported, but Haddock is buggy. Please ignore. 0KRequire that the following files are built before continuing. Particularly  necessary when calling . As an example:   "*.rot13" 4 \ out -> do  let src = 1 out  0 [src]   ["rot13",src,"-o",out] 1ORequire that the following are built by the rules, used to specify the target.    main =   $ do  1 ["Main.exe"]  ... This program will build Main.exe, given sufficient rules. 2<Define a rule to build files. If the first argument returns X for a given file, 9 the second argument will be used to build it. Usually 4 is sufficient, but 2 gives X additional power. For any file used by the build system, only one rule should return X.   (all isUpper . !) 2 \ out -> do  let src =  & out $ map toLower $ takeBaseName out   . map toUpper =<<  src 3QDefine a set of patterns, and if any of them match, run the associated rule. See 4. 4Define 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" 4 \ out -> do  let src = 1 out  0 [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. 0123401234 01234None5FAdd extra information which your build should depend on. For example:  & addOracle ["ghc"] $ return ["7.2.1"] 0 addOracle ["ghc-pkg","shake"] $ return ["1.0"] 6If a rule depends on the GHC version, it can then use 7 ["ghc"], and Z if the GHC version changes, the rule will rebuild. It is common for the value returned  by 7 to be ignored. The Oracle maps questions of [String] to answers of [String]. This type is a Z compromise. Questions will often be the singleton list, but allowing a list of strings ' allows hierarchical schemes such as  ghc-pkg shake,  ghc-pkg base etc. W The answers are often singleton lists, but sometimes are used as sets - for example $ the list of packages returned by ghc-pkg. Actions passed to 59 will be run in every Shake execution they are required, Z their value will not be kept between runs. To get a similar behaviour using files, see  . 69Add a function to generate an oracle, matching a prefix. 5 addOracles ["reverse"] $ \xs -> return $ reverse xs 7&Get information previously added with 5. 567567567 None8IAlways rerun the associated action. Useful for defining rules that query ! the environment. For example:   "ghcVersion.txt"   \ out -> do  8  (stdout,_) <- ! "ghc" [" --version"]  " out stdout  888#None9<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"] 9 \[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 4 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 9. 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:  C test x == Just ys ==> x `elem` ys && all ((== Just ys) . test) ys 7As an example of a function satisfying the invariaint:  . test x | takeExtension x `elem` [".hi",".o"] C = Just [dropExtension x <.> "hi", dropExtension x <.> "o"]  test _ = Nothing Regardless of whether Foo.hi or Foo.o( is passed, the function always returns [Foo.hi, Foo.o]. 9:9:9:%None ;ZExecute a system command. This function will raise an error if the exit code is non-zero.  Before running ; make sure you 0 any required files. <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 0 any required files. ' systemCwd "/usr/MyDirectory" "pwd" [] =$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 0 any required files. >copyFile old new copies the existing file from old to new. The old file is has 0 called on it  before copying the file. ?Read a file, after calling 0. @Write a file, lifted to the   monad. A A version of ?* which also splits the result into lines. B A version of @# which writes out a list of lines. C5Write a file, but only if the contents would change. ;<=>?@ABC ;<=>?@ABC ;<=>?@ABCNoneD[Main entry point for running Shake build systems. For an example see the top of the module Development.Shake.  Use % to specify how the system runs, and   to specify what to build. D?  !"#$%&'()*+,-./0123456789:;<=>?@ABCD?D  !"# $%&*'();<=>?@ABC01432:9 ,-./5678+D&'()*+,-./012 3456789:;<<= >?@ABC DEFGHIJKLMNOPQR ST UVW #X#Y%%Z%!%[%%%\%]%"^_`abcdefghiijklmnopqrstuvwx)tuvyz{|}~noqqqq     q !"#$%&'()*+,-./0123456789:;<=>$?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`qabqcdnoenofgqhijk lmnopqrst3uvwxxgyz{|}~         ######## shake-0.3.8Development.ShakeDevelopment.Shake.FilePath Paths_shakeDevelopment.Shake.FileTimeDevelopment.Shake.ReportDevelopment.Shake.Locksshake withResourceAction shakeOptions shakeThreadswant*>system'need<.>Development.Shake.PoolDevelopment.Shake.BinaryDevelopment.Shake.ValueDevelopment.Shake.StorageDevelopment.Shake.InternDevelopment.Shake.DatabaseDevelopment.Shake.FilePatternDevelopment.Shake.CoreDeveloment.ShakeDevelopment.Shake.DirectoryDevelopment.Shake.File writeFile' readFile'Development.Shake.Oracle alwaysRerunDevelopment.Shake.Rerun systemOutputwriteFileChangedDevelopment.Shake.FilesreplaceExtensionDevelopment.Shake.Derivedtransformers-0.3.0.0Control.Monad.IO.ClassliftIOResource newResourcedropDirectory1takeDirectory1 normalisetoNativecombine FilePattern?==RulesRule validStored Verbosity DiagnosticLoudNormalQuietSilent ShakeOptions shakeFiles shakeVersionshakeVerbosity shakeStaunch shakeReport shakeLintshakeDeterministic defaultRuleruleactionwithoutActionsapplyapply1tracedputLoud putNormalputQuiet getVerbosity doesFileExistgetDirectoryContentsgetDirectoryFilesgetDirectoryDirs?>**> addOracle addOracles askOracle*>>?>> systemCwd copyFile' readFileLineswriteFileLinescatchIOversionbindirlibdirdatadir libexecdir getBinDir getLibDir getDataDir getLibexecDirgetDataFileNameFileTimegetModTimeMaybegetModTimeError buildReport runTemplateghc-prim GHC.TypesIObaseGHC.MVarMVarBarrierVarLockacquireResourcereleaseResourcenewLockwithLocknewVarreadVar modifyVar modifyVar_ newBarrier signalBarrier waitBarrier$fShowResource $fShowBarrier $fShowVar $fShowLockstepaddPool blockPoolrunPoolSthreadsworkingblockedtodoPoolTreeBranchLeafQueueNonDetnonDetnewQueueenqueuePriorityenqueuedequeue insertTree removeTreeemptyS BinaryWithputWithgetWith$fBinaryWithctxMaybe$fBinaryWithctx[]$fBinaryWithctx(,)WordGHC.WordWord8Word16Word32Word64binary-0.5.1.1 Data.Binary decodeFile encodeFiledecodeencodegetputBinaryData.Binary.PutputWord8PutData.Binary.GetgetWord8GetWitness typeNames witnessIn witnessOutValueKeynewKeynewValuetypeKey typeValuefromKey fromValuewitnessregisterWitnesscurrentWitness$fBinaryWithWitnessValue$fBinaryWitness $fEqWitness $fEqValue$fHashableValue $fNFDataValue $fShowValue $fShowKeyasyncExceptionMapdatabaseVersion withStorage readChunkstoChunk showExceptionIdInternemptyinsertaddlookuptoListfromList$fBinaryWithwIdvalidexecDatabase startTimebuilddependencyOrder resultsOnlyStepKeyOpsDepends fromDependsWaitingPendingResultresultbuiltchangeddepends executiontracesStatusMissingLoadedErrorReadylockinternstatusjournalloggerTraceStackTimeDurationStepincStepdurationwhenJust showStackaddStack checkStack emptyStackisError isWaitingisReady afterWaiting newWaiting runWaitingwaitFor getResultshowJSON checkValidstepKey toStepResultfromStepResult withDatabase$fBinaryWithWitnessStatus$fBinaryWithWitnessResult$fBinaryWithWitnessStep $fShowPendingGHC.IOFilePathfilepath-1.3.0.1System.FilePath.Posix makeRelative isAbsolute isRelative makeValidisValid equalFilePathjoinPathsplitDirectories splitPathreplaceDirectory takeDirectorydropTrailingPathSeparatoraddTrailingPathSeparatorhasTrailingPathSeparatorreplaceBaseName takeBaseName takeFileName dropFileNamereplaceFileName splitFileNameisDrivehasDrive dropDrive takeDrive joinDrive splitDrivetakeExtensionsdropExtensionssplitExtensions hasExtension addExtension dropExtension takeExtensionsplitExtension getSearchPathsplitSearchPathisExtSeparator extSeparatorisSearchPathSeparatorsearchPathSeparatorisPathSeparatorpathSeparators pathSeparatormatch compatibleextract substituteSStringRegexEmptyRepeatConcatOrBracketEndStartAnyNotLitLexemeChar SlashSlashStarisCharlexerpattern Data.MonoidMonoidGHC.BaseMonadTrueFalseShakeException Data.MaybeNothing rulePriorityrundatabasepoolstartedstoredexecuteoutput verbositystackdiscountvalueactionsrulesARuleruleKey ruleValue ruleStored wrapStackregisterWitnesses createStored createExecute runAction applyKeyValueputWhen$fFunctorRules $fMonadRules $fMonoidRules$fShowShakeException$fExceptionShakeExceptiondefaultRuleDirectoryGetDir_GetDir GetDirDirs GetDirFilespatdirExist getDirActiongetDir$fRuleGetDirGetDir_$fRuleExistBool$fBinaryGetDir$fHashableGetDir$fNFDataGetDir $fShowGetDir $fShowExistdefaultRuleFileFileroot$fRuleFileFileTime $fShowFile $fNFDataFileAnswerQuestion$fRuleQuestionAnswer$fShowQuestionDirty AlwaysRerundefaultRuleRerun$fRuleAlwaysRerunDirty $fEqDirty $fShowDirty$fShowAlwaysRerun FileTimesFiles getFileTimes$fRuleFilesFileTimes $fShowFiles $fNFDataFiles