e      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     None 9;AT"Chunk is a part of quasy-quotationthe text$(expr) or @(expr) A simple  to interpolate  into other pieces of . Expressions can be embedded using $(expr) or @(expr), and values can be interpolated with $name. Inside $( )s, if you have a string of ambiguous type, it will default to the Show instance for toText, which will escape unicode characters in the string, and add quotes around them. Safe09:;<=gConvert File back to FilePath toFilePath :: (FileT h FilePath) -> FilePath toFilePath (FileT _ f) = fRedefine standard  / operator to work with FilesAlias for replaceExtension     Safe0!jSimple wrapper for FilePath. The first type argument is a Hint, containing the path to the current module$.Relative path from top-level dir to the module%.Relative path from module to the top-level dir'Recipe answers to the question 'How to build the targets'. Internally, it contains sets of targets and prerequisites, as well as shell commands required to build former from latter)Targets* Prerequisites+A list of shell commands,A set of variables employed in the recipe. The target Makefile should notice changes in those variables and rebuild the targets-+A set of tools employed in the recipe. Make.%Location (probably, doesn't function)/ Set of flags (Makefile-specific)6Command represents OS command line and consists of a list of fragments. Each fragment is either text (may contain spaces) or FilePath (spaces should be escaped)7NThe representation a tool used by the Makefile's recipe. Typical example are gcc or bison9 Name of tool.:(The representation of Makefile variable.<The name of a variable=UNothing means that variable is defined elsewhere (eg. borrowed from the environment)TEDefine the Makefile-level variable. Rules, referring to a variable, notice it's changes.UDeclare the variable defined elsewhere. Typycally, environment variables may be decalred with this functions. Variables are tracked by the cake3. Rules, referring to a variable, notice it's changes.VReref to special variable $(MAKE)XConverts string representation of Path into type-safe File. Internally, files are stored in a form of offset from module root directory, plus the path from top-level dir to module root and back (see ModuleLocation)TODO: rename to mkFileYEPath to the module (a directory), which have originally declared the fileZAdds ./( before the path, marking it as relative[tReturns the path to the file, relative to the top-level directory (the place, where the target Makefile is located)\Converts path x! to the back-path, consisting of '..' directories]Returns path from file s to t, via the top-level directory^1Convert File back to FilePath with escaped spaces>!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST Variable name Default valueUVWXYZ[\]^>!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^>:;<=7896345>?012'()*+,-./@AB&CDEFGHIJKLMNOPQRSTUV"#$%W!XYZ[\]^*!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^None 09:;<=?I3weClass of things which may be referenced using '$(expr)' syntax of the quasy-quoted shell expressionsx@Register the input item, return it's shell-script representationyfClass of things which may be referenced using '@(expr)' syntax of the quasi-quoted shell expressions.{ESimple wrapper for strings, a target for various typeclass instances.~cCommandGen is a recipe-builder packed in the newtype to prevent partial expansion of it's commands*Verison of Action monad with fixed parents here stands for Action. It is a State monad carrying a Recipe as its state. Various monadic actions add targets, prerequisites and shell commands to this recipe. After that, rule function records it to the  MakeStateC. After the recording, no modification is allowed for this recipe.AA Monad providing access to MakeState. TODO: not mention IO here.YMakeState describes the state of the EDSL synthesizers during the the program execution.kPrebuild commands. targets/prerequsites of the recipe are ignored, commands are executed before any targetPostbuild commands.;Prebuild commands stored in a Set. Reactive-style-friendly.<Postbuild commands stored in a Set. Reactive-style-friendly.;The set of recipes, to be checked and renderd as a Makefile&Current location. FIXME: fix or remove*Set of files which the Makefile depends onFPlacement list is the order of targets to be placed in the output fileDSet of files to include in the output file (Makefile specific thing)Errors found so farWarnings found so farTName of the Makefile being generated , tmpIndex :: Int ^ Index to build temp namesextra clean filesAdd prebuild commandAdd postbuild command<Find recipes without targets. Empty result means 'No errors'=Find recipes sharing a target. Empty result means 'No errors'Evaluate the Make monad mf0, return MakeState containing the result. Name mf& is used for self-referencing recipes.FAdd 'include ...' directive to the final Makefile for each input file.A class of monads providing access to the underlying A monad. It tells Haskell how to do a convertion: given a . (A' m) -> a class (Monad m, Monad a) => MonadAction a m | a -> m where liftAction :: A' m x -> a x Fill recipe r using the action act by running the action monad1Create an empty recipe, fill it using action @act4Version of runA discarding the result of computation"Get a list of targets added so far(Get a list of prerequisites added so farMark the recipe as PHONYI i.e. claim that all it's targets are not real files. Makefile-specific.0Adds the phony target for a rule. Typical usage: <rule $ do phony "clean" unsafeShell [cmd|rm $elf $os $d|] Mark the recipe as  INTERMEDIATE] i.e. claim that all it's targets may be removed after the build process. Makefile-specific.Obtain the contents of a File. Note, that this generally means, that Makefile should be regenerated each time the File is changed.*Pack the command builder into a CommandGen7Modifie the recipe builder: ignore all the dependenciesaApply the recipe builder to the current recipe state. Return the list of targets of the current Recipe under construction)Version of @shell returning a single file Version of shell& which doesn't track it's dependencies"An alias to CakeString constructordAdd it's argument to the list of dependencies (prerequsites) of a current recipe under construction*Declare that current recipe produces item x.Add variables vs' to tracking list of the current recipe Add tools ts+ to the tracking list of the current recipeAdd commands to the list of commands of a current recipe under construction. Warning: this function behaves like unsafeShell i.e. it doesn't analyze the command text,Set the recipe's location in the Cakefile.hsSet additional flagsHas effect of a function QQ -> CommandGen7 where QQ is a string supporting the following syntax:P$(expr) evaluates to expr and adds it to the list of dependencies (prerequsites)<@(expr) evaluates to expr and adds it to the list of targets$$ and @@ evaluates to $ and @Example [cmd|gcc $flags -o @file|]is equivalent to  return $ CommandGen $ do s1 <- refInput "gcc " s2 <- refInput (flags :: Variable) s3 <- refInput " -o " s4 <- refOutput (file :: File) return (s1 ++ s2 ++ s3 ++ s4)^Later, this command may be examined or passed to the shell function to apply it to the recipebwxyz{|}~$Location string (in the Cakefile.hs)Recipe builderA name of phony targetFile to read contents of/Command builder as returned by cmd quasi-quoter9File or [File] or (Set File) or other form of dependency.'File or [File] or other form of target.*A set of variables to depend the recipe on"A set of tools used by this recipeNwxyz{|}~b~}{|yzwxJwxyz{|}~None9:;I$Turns multi-target rules of the forma b c : d e f cmd1into the pair:(a : stampX b : stampX c : stampX2.INTERMEDIATE:stampX stampX : d e f cmd1hOperate on a prerequisites which themselfs are targets of a multitarget rule. Make the conversion from:a b c : x x : a y : bto%a b c : x x : a b c y : a b c Define a cleanY phony target. The rule removes all targets except phony targets and the Makefile itselfDefault Makefile location'There are only 2 kind of rules: 1) rules which depend on the Makefile, and 2) rules which Makefile depends on. Case-2 is known in advance (for example, when the contents of a file is required to build a Makefile then Makefile depends on this file). This function adds the case-1 dependencies.RRender the Makefile. Return either the content (Right), or error messages (Left).%Safe None9:;<=?I /A Generic Make monad runner. Execute the monad mk, provide the output handler with Makefile encoded as a string. Note that Makefile may contain rules which references the file itself by the name makefileK. In case of errors, print report to stderr and abort the execution with fail call A Version of runMakeH returning no state Execute the mkr monad, return the Makefile as a String. In case of errors, print report to stderr and abort the execution with fail call  Execute the mk monad, build the Makefile, write it to the output file. In case of errors, print report to stderr and abort the execution with fail callIRaise the recipe's priority (it will appear higher in the final Makefile) Build a Recipe using the builder provided and record it to the MakeState. Return the copy of Recipe (which should not be changed in future) and the result of recipe builder. The typical recipe builder result is the list of it's targets.Example@ Lets declare a rule which builds "main.o" out of "main.c" and CFLAGS variable Ulet c = file "main.c" rule $ shell [cmd| gcc -c $(extvar "CFLAGS") -o @(c.="o") $c |] bCreate the rule, place it's recipe above all recipies defined so far. See rule' for other details rA version of rule, without monad set explicitly rule' :: (MonadMake m) => A a -> m a rule' act = liftMake $ snd  $ withPlacement (rule2 act)Build a rule for creating file tgt with a fixed content cnt, use additional actions act for the recipe 1Similar to @genFile' with empty additional action Result of evalMakeHandler to output the fileResult of evalMakeHandler to output the file  Output fileMakefile builder Recipe builder1The recipe itself and the recipe builder's result Recipe builder        !"#$%&'()*+,-./0123456789:;<=>  !"#$%':STUVX[wxyz{~     A:'wxyz{   !"#$%X[  TUS~V      None 09:;<=IT[ 2Additional prerequisitesC'File.o to link, additional linker flagsF(Module name, UrWeb name, JavaScript nameU+Converts FILE.urs to the Ur/Web module name`1Returns autogen dir for the current module's filee!Produce fixed-content rule using 8f as a uniq name template, add additional dependencies dsw.Build a file using external Makefile facility.x.Build a file using external Makefile facility.yMBuild a file from external project. It is expected, that this project has a Makwfile> in it's root directory. Call Makefile with the default targetzMBuild a file from external project. It is expected, that this project has a Makwfile in it's root directory{Build a file from external project. It is expected, that this project has a fiel.mk (a Makefile with an unusual name) in it's root directory !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwExternal MakefileExternal file to refer toThe name of the target to runxExternal MakefileExternal file to refer toy'File from the external project to buildz'File from the external project to build{|}~ !"#$%&'()*+,-./0123456789:;<>?=@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~UOPQRSTKLMN<=>?@ABCDEFGHIJ89:;6745)*+,-./0123'(%&VWXYZ[\]^_`#$!"a bcdefghijklmnopqrstuvwxyz{|}~o !"#$%&'() *+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ None NoneBuild the full Makefile named fo and a set of sliced versions. SlicingY here means filtering out all rules depending on certain tools (second element of every sls# pairs) and all the upstream rules.?     !"#$%&'()*+,,-./00123456789:;<=>??@AABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%%&&''()*+,-./011223456789:;<=>?@ABCDE:FGH9IJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     _      !"#$$%&'&'&()*)+),)-./.0.1.234356789:;<=>?@AB"cake3-0.6.4-97sDSiL8qQwEmGRm1I49evText.QuasiMakeSystem.FilePath.WrapperDevelopment.Cake3.TypesDevelopment.Cake3.MonadDevelopment.Cake3.Writer#Development.Cake3.Ext.UrEmbed.TypesDevelopment.Cake3Development.Cake3.Ext.UrWebDevelopment.Cake3.Utils.FindDevelopment.Cake3.Utils.SliceChunkTE getChunks $fTextisha $fTextish[] $fTextishText $fShowChunk $fEqChunkFileLikecombine takeDirectory takeBaseName takeFileName makeRelativereplaceExtension takeExtensiontakeExtensionsdropExtensions dropExtensionsplitDirectoriesFileT fromFilePath.= $fFileLike[]$fFileLikeFileT $fFileLikem $fShowFileT $fEqFileT $fOrdFileT $fDataFileTFileModuleLocationtop2modmod2topTargetRecipertgtrsrcrcmdrvarsrtoolsrlocrflagsFlagPhony Intermediate CommandPieceCmdStrCmdFileCommandTooltnameVariablevnamevval return_text return_file emptyRecipeaddPrerequisitesaddPrerequisitegroupSet groupRecipesflatternapplyPlacement'filterRecipesByToolsfilterRecipesByTargetsfilterRecipesByToolsDeepapplyPlacementtransformRecipestransformRecipesM_queryVariablesqueryVariablesE queryTargets queryPrereqvarintermediateFilestoolmakevarextvarmaketoplevelModulefile' fileModuledottifytopRelwaybackroute escapeFile$fShowVariable $fEqVariable $fOrdVariable$fDataVariable $fShowTool$fEqTool $fOrdTool $fDataTool $fShowFlag$fEqFlag $fOrdFlag $fDataFlag$fDataModuleLocation$fShowModuleLocation$fEqModuleLocation$fOrdModuleLocation$fShowCommandPiece$fEqCommandPiece$fOrdCommandPiece$fDataCommandPiece $fShowRecipe $fEqRecipe $fOrdRecipe $fDataRecipeRefInputrefInput RefOutput refOutput CakeString CommandGen CommandGen' unCommandAA'unA'MakeMake'unMake MonadMakeliftMake MakeStateMS prebuilds postbuilds prebuildsS postbuildsSrecipesslocmakeDeps placementincludeserrorswarnings outputFile extraCleanLocationinitialMakeStatedefrgetPlacementPos addPlacement addMakeDeptmp_fileprebuild prebuildS postbuild postbuildScheckForEmptyTargetcheckForTargetConflictsevalMake modifyLoc addRecipegetLocincludeMakefilerunA'runArunA_targets prerequisites markPhonyphonymarkIntermediatereadFileForMake commandGen ignoreDependsshellshell1 unsafeShellstring inbetweenspacifydependproduce variablestoolscommandslocationflagscmd$fRefInputA'CommandGen'$fRefInputA'CakeString$fRefInputA'Tool$fRefInputA'Variable$fRefInputaMaybe $fRefInputaIO$fRefInputaSet $fRefInputa[]$fRefInputA'Recipe$fRefInputaMake'$fRefInputA'FileT $fRefOutputmm$fRefOutputmMaybe$fRefOutputmSet$fRefOutputm[]$fRefOutputmFileT$fMonadLocMake'$fMonadMakeStateT $fMonadMakeA'$fMonadMakeMake' $fMonadMake'$fFunctorMake'$fApplicativeMake'$fMonadStateMake'$fMonadIOMake'$fMonadFixMake' $fMonadA' $fFunctorA'$fApplicativeA'$fMonadStateA' $fMonadIOA' $fMonadFixA'$fShowCakeString$fEqCakeString$fOrdCakeStringdefaultMakefile buildMake$fToMakeTextSet$fToMakeTextCommandPiece$fToMakeText[]$fToMakeTextFileT$fToMakeText[]0$fFunctorMakeLL $fMonadMakeLL$fMonadStateMakeLL$fApplicativeMakeLLUrlArgsbverout_cout_hout_urs out_wrapper out_ffi_jsmangle_css_urlinp guessModName uwModName urblobfun urtextfuncblobfunctextfuncss_mangle_flagcurrentDirLocationrunMakeH runMakeH_runMake writeMakerule'rulegenFile'genFilegitSubmoduleFile Mangled_FileCSS_FileJS_File EmbedDeclembedSrcDeclsrcLinkDecllink ModuleDeclur LibraryDecllibrary MonadUrpGen liftUrpGenUrpGenunUrpGen ToUrpLine toUrpLine ToUrpWord toUrpWordUWExeUWLibUrpurp_uexeuhdrumodsrcspatchesdbstrprereq urautogenDBStringSrcFile UrpModToken UrpModule1 UrpModule2 UrpModuleSys UrpHdrTokenUrpSqlUrpAllow UrpRewrite UrpLibraryUrpDebug UrpIncludeUrpLink UrpPkgConfigUrpFFI UrpJSFunc UrpSafeGet UrpScript UrpClientOnlyUrpFileUrpStyleUrpAllUrpTableUrpMimeUrpUrlUrpResponseHeader UrpEnvVar UrpHeaderembeddedModuleNameurpDepsurpSql'urpSqlurpExe'urpExe urpPkgCfg urpDatabase' urpDatabase urpDbnamedefUrp autogenDir maskPkgCfg runUrpGen tempPrefix manglePathgenInlineurweb uwinclude uwincludediruwccuwxxuwcflagsuwlibuwflagsuwappuwapp_postgresaddHdraddSrcaddPatchdatabaseallowrewrite externalMake3 externalMake' externalMakeexternalMakeTarget externalMake2addModsyspairdebugincludefficsssqljsFuncsafeGeturlmimestylealltableenvhdr requestHeaderresponseHeaderscript pkgconfigurembedembed'mangledstaticfile_$fEmbedDeclMake'$fEmbedDeclMangled_File$fEmbedDeclFileT$fSrcDeclMake'$fSrcDeclFileT $fSrcDecl(,,)$fLinkDeclMake'$fLinkDeclFileT $fLinkDecl(,)$fModuleDecl(,)$fModuleDeclUrpModToken$fModuleDeclFileT$fLibraryDeclmm$fLibraryDeclmm0$fLibraryDeclmUWExe$fLibraryDeclmUWLib$fLibraryDeclm[]$fLibraryDeclmFileT$fMonadUrpGenmUrpGen$fRefInputUrpGenFileT$fToUrpLineUrpModToken$fToUrpLineUrpHdrToken$fToUrpLineDBString$fToUrpWordUrpRewrite$fToUrpWordUrpAllow$fRefInputA'UWExe$fRefInputA'UWLib$fShowUrpAllow$fDataUrpAllow$fShowUrpRewrite$fDataUrpRewrite$fShowUrpHdrToken$fDataUrpHdrToken$fShowUrpModToken$fDataUrpModToken $fShowSrcFile $fDataSrcFile$fShowDBString$fDataDBString $fShowUrp $fDataUrp $fShowUWLib $fDataUWLib $fShowUWExe $fDataUWExe$fFunctorUrpGen$fApplicativeUrpGen $fMonadUrpGen$fMonadStateUrpGen$fMonadMakeUrpGen$fMonadIOUrpGen filterDirectoryContentsRecursive filterExtsgetDirectoryContentsRecursive'getDirectoryContentsRecursive writeSlicedtemplate-haskellLanguage.Haskell.TH.Quote QuasiQuoter#text-1.2.2.1-9Yh8rJoh8fO2JMLWffT3QsData.Text.InternalTextTextishtoTextfixMultiTargetcompleteMultiTarget defineClean addMakeDepsLines MakeRegionMRmrnamemrtextMakeLLunMakeLL ToMakeText toMakeTextsmaptextfresh runMakeLL copyRecipeLLruleLLapplySubprojectshasClean cleanRuleLLaddRebuildDeps isRequiredForrunLines writeRegionsregion writeRules withPlacementbase Control.MonadguardGHC.BasejoinMonad>>=>>returnfailFunctor<$fmap Data.StringIsString fromString Applicativepure<*>*><*Data.TraversablemapMsequenceString Alternativemanyempty<|>some MonadPlusmzeromplusmfilter<$!>unless replicateM_ replicateMfoldM_foldM zipWithM_zipWithM mapAndUnzipMforever<=<>=>filterMforMControl.Applicativeoptional WrappedMonad WrapMonad unwrapMonad WrappedArrow WrapArrow unwrapArrowZipList getZipListData.Functor.ConstConstgetConst Data.Foldablemsum sequence_forM_mapM_ Data.OldListunwordswordsunlineslines Data.Functorvoid<$>apliftM5liftM4liftM3liftM2liftMwhen=<<liftA3liftA2liftA<**>