úÎh{`?      Safe None345689;=FT )HState monad providing context, i.e. function we've already called before.datatype for a token returning a random string!$Pretoken, aka token as first read in dataype for a key aka token name"0datatype for a double representing a probability#Make N a monoid so we can append them together nicely (since they do generate text). d(Value "Hello") <> (List [(0.5," you"), (0.5, " me")]) (List [(0.5,"Hello you"), (0.5, "Hello me")])$@Compare inside the state monad using only the underlying objects !%&"'()*!&%(*)None<üDatatype for a semantic error+5Throw custom error given by string, within the parser,Throw  error within parser--Throws error when a function is defined twice.Constant to start s/ Convert a Text to a 0 for use with a pretty-printer1*big semantics checker that sequences stuff2fTake the head of the list, or throw the appropriate error given which functions we are trying to call.39Access argument, or throw error if the list is too short.4'checker to verify there is at most one :return or  :define key statement5 Checks that we have at most one  `:return` template in the file6+Checks that there are no instances of a key7Derived via our show instance;8 display a ! nicely with coloration & whatnot  912:3 Nones;Draw as a syntax Tree<Function to transform a 7 into a `Tree String` so that it can be pretty-printed. tokToTree 1.0 tok;None;=Ü =Drop file Extension>"Get directory associated to a file?1Function to apply a value on both arguments, e.g. between .$ (char '"')@0Normalize pre-tokens/corresponding probabilitiesA-Helper function for creating a cdf from a pdfBShow as a T.TextCPretty-print a ParseErrorDStrip a pre-token's nameERead a file in as a Text =>?@ABCDFENone#‡  Generate randomized text from a  †getText :: IO T.Text getText = do let exampleTok = List [(1.0,List [(0.5,Value "heads"),(0.5,Value "tails")])] run exampleTok ,Same thing, but uses a catamorphism (slower)G5Helper function to compute the cdf when we have a pdfHAAnother helper function, this time for use with our catamorphism. None+Ž I(A map with all the modifiers for MadlangJJumble the words in a stringKStrip file extensionLGet the :return valueM(Convert the stuff after the number to a N5Build token in tree structure, without concatenating.O2Build the token without concatenating, yielding a # suitable to be printed as a tree.P+Given keys naming the tokens, and lists of ! , build our QPSort the keys that we have parsed so that dependencies are in the correct placesR.Ordering on the keys to account for dependencyIJKLOPQ NoneBÉ S0Parse a lexeme, aka deal with whitespace nicely.T*space consumer with awareness for commentsU6parse a symbol, i.e. string plus surrouding whitespaceVParse a number/probabilityWParse an integerX-Make sure definition blocks start un-indentedY0Make contents of definition blocks are indented.ZParse between quotes[Parse a keyword\ Parse a var] Parse the ] keyword.^ Parse the _ keyword.` Parse the ` keyword.a Parse the  `:return` keyword.b&Parse a template name (what follows a  `:define` or c block)dParse a modifiereParse template into a ! of referents and stringsf*Parse a probability/corresponding templategParse a function name for a  `:category` block.h Parse an `iParse a ] block_Parse a _ blockjParse a  `:library` declarationk Parse the  `:return` blocklParse the program in terms of ! and the s to link them.QParse text as a token + context (aka a reader monad with all the other functions)mParse text as token + contextn!Parse text as a list of functionso@Parse text as a list of tokens, suitable for printing as a tree.Parse text given a context }import qualified Data.Text.IO as TIO getParsed = do f <- TIO.readFile "template.mad" parseTok "filename.mad" [] [] f8Parse text as a token, suitable for printing as a tree..pParse inclusions!File name to use for parse errors2Context, i.e. other random data paired with a key.1list of variables to substitute into the templateActaul text to parseResultnoqrp None<M+ Parse a template file into the  data types'Generate text from file with inclusionsKCache the parsed strucutre (and libraries it depends on) as a binary file `.filename.mbc`(, reading instead from it when possible.:Generate randomized text from a file containing a templatetRun n times.uRun in the appropriate folder-Run based on text input, with nothing linked.vGet file as contextBParse a template into a RandTok suitable to be displayed as a tree)variables to substitute into the templatefolderfilepath within folderparsed 1List of variables to substitute into the templatePath to .mad file.Resultwx None09KWŠy for an EDSL, e.g. ydemoQQ :: T.Text demoQQ = run [madlang| :define something 1.0 "hello" 1.0 "goodbye" :return 1.0 something |] nNote that this is in general much faster than running interpreted code, though inclusions do not work in the y or in spliced expressions.z Convert a {] containing to a `Q Exp` with the parsed syntax tree. Embedded code can contain inclusions.|_Turn a parse error into an error that will be caught when Template Haskell compiles at runtime.Splice for embedding a '.mad' file, e.g. >demo :: IO T.Text demo = run $(madFile "twitter-bot.mad") %Embedded code can contain inclusions. NoneXÍ}As an example, `vmchale/some-library` would be valid input.}~€ None^æ datatype for the subcommands‚datatype for the programƒ/Parser for command-line options for the program„Parser for the run subcommand… Parser for the sample subcommand†Parser for the lint subcommandMain program actionExample Usage: -$ madlang run example.mad some text generated‡Wraps parser with help parserˆ7given a parsed record perform the appropriate IO action‰Š‹ŒŽ‘’’“‚”•None_q   –     ! " # $ % &'()*+,-./012/3456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a b c d e f g h i j k l m n o p qrst u v w x y z { | } ~  € ‚ ƒ „ … † ‡ ˆ ‰Š‹Œ rsŽ ‘ ’ “ ” • – — ˜ ™ š › œ  ž Ÿ   ¡ ¢ £ ¤ ¥ ¦ • §¨&madlang-4.0.0.4-2T9YsGOSo2y2kyhPE88Vuh Text.Madlibs Paths_madlangText.Madlibs.Internal.TypesText.Madlibs.Cata.SemErrText.Madlibs.Cata.DisplayText.Madlibs.Internal.UtilsText.Madlibs.Cata.RunText.Madlibs.Ana.ParseUtilsText.Madlibs.Ana.ParseText.Madlibs.Ana.ResolveText.Madlibs.Generate.THText.Madlibs.Packaging.FetchText.Madlibs.Exec.MainContextRandTokListValueKey SemanticErrorNoReturnCircularFunctionCallsInsufficientArgsDoubleDefinition NoContextImportNotFoundrunrunCata parseTokMparseTok parseTree parseFile cacheFilerunFilerunTextmakeTreemadlangmadFile runMadlangversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileNamePreTokProb$fMonoidRandTok $fEqStateTNameapplyRandTokFValueFListF customErrornoReturndoubleDefinition semErrStarttext'-ansi-wl-pprint-0.6.8.2-HWpcNOPVvAd306GvUbpgip%Text.PrettyPrint.ANSI.Leijen.InternalDoccheckSemanticshead'accesscheckKeysingleInstance noInstance$fExceptionSemanticError$fShowSemanticErrorParser headNoReturn displayTree tokToTree dropExtensiongetDir.$ normalizecdfshow'parseErrorPretty'unTok readFile' readLibFilemkCdf mkCdfCata modifierListjumblestrip takeTemplate concatTokbuildTok buildTreebuildsortKeys orderKeyslexeme spaceConsumersymbolfloatinteger nonIndented indentGuardquotekeywordvardefinecatcategoryincludemainnamebaseGHC.BasereturnmodifierpreStrpairfunction inclusions definition preLibraryfinalprogram parseTreeM parseTokF parseTreeFparseInclusionsparseTokInternalparseTokFInternalgetInclusionCtx runInFolderN runInFolderparseCtxpathSeprunFileNtemplate-haskellLanguage.Haskell.TH.Quote QuasiQuotertextToExpressionStringerrorgen fetchGithubinstallVimPlugin fetchPackages cleanPackages SubcommandProgramorderstempsamplelintwrappertemplateDebugRunLintSampleGetInstall VimInstallinput_repclInputs_remotesub