h`q      NoneAs an example, `vmchale/some-library` would be valid input.None 23489;DRHState 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 name0datatype for a double representing a probability@Compare inside the state monad using only the underlying objectsMake 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")]) !"#$%&'  !$%&  !"#$%&'None9; (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 probabilities,-Helper function for creating a cdf from a pdf-Show as a T.Text.Pretty-print a ParseError/Strip a pre-token's name0Read a file in as a Text ()*+,-./0 ()*+,-./0 ()*+,-./0None:Datatype for a semantic error15Throw custom error given by string, within the parser2Throw  error within parser3-Throws error when a function is defined twice4Constant to start s5 Convert a Text to a 6 for use with a pretty-printer7*big semantics checker that sequences stuff8fTake the head of the list, or throw the appropriate error given which functions we are trying to call.99Access argument, or throw error if the list is too short.:'checker to verify there is at most one :return or  :define key statement; Checks that we have at most one  `:return` template in the file<+Checks that there are no instances of a key=Derived via our show instance;> display a ! nicely with coloration & whatnot ?1@234578A9:;<=>  ?78A9 ?1@234578A9:;<=>None  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 B5Helper function to compute the cdf when we have a pdf B  BNoneCDraw as a syntax TreeDFunction to transform a 7 into a `Tree String` so that it can be pretty-printed. tokToTree 1.0 tokCEDCCEDNone F(A map with all the modifiers for MadlangGJumble the words in a stringHStrip file extensionIGet the :return valueJ(Convert the stuff after the number to a K5Build token in tree structure, without concatenating.L2Build the token without concatenating, yielding a # suitable to be printed as a tree.M+Given keys naming the tokens, and lists of  , build our NPSort the keys that we have parsed so that dependencies are in the correct placesO.Ordering on the keys to account for dependency FGHIJKLMNPQROFGHILMN FGHIJKLMNPQRO None 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 inclustions"SqTUVWXYZ[\]^`abdefghi_jrkl mno !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 parseResultp no p"SqTUVWXYZ[\]^`abdefghi_jrkl mno p None:Parse a template file into the  data types'Generate text from file with inclusions:Generate randomized text from a file containing a templatetRun in the appropriate folder-Run based on text input, with nothing linked.uGet file as contextBParse a template into a RandTok suitable to be displayed as a tree)variables to substitute into the templatefolderfilepath within folderparsed s1List of variables to substitute into the templatePath to .mad file.Resulttustu None/8Iv 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 v or in spliced expressions.w Convert a x6 containing to a `Q Exp` with the parsed syntax tree.y_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") 6Note that the embedded code cannot have any inclusionswyzwyz Safe{|}~|{|}~ None datatype for the subcommandsdatatype for the program/Parser for command-line options for the programParser for the run subcommand Parser for the sample subcommandParser for the lint subcommandMain program actionExample Usage: -$ madlang run example.mad some text generatedWraps parser with help parser7given a parsed record perform the appropriate IO action None           ! " #$%&'()*+,-)./0123456789:;<=>?@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-3.1.1.13-ro5c0ljC0wGTi0vFa900y Text.MadlibsText.Madlibs.Packaging.FetchText.Madlibs.Internal.TypesText.Madlibs.Internal.UtilsText.Madlibs.Cata.SemErrText.Madlibs.Cata.RunText.Madlibs.Cata.DisplayText.Madlibs.Ana.ParseUtilsText.Madlibs.Ana.ParseText.Madlibs.Ana.ResolveText.Madlibs.Generate.TH Paths_madlangText.Madlibs.Exec.MainContextRandTokListValueKey SemanticErrorNoReturnCircularFunctionCallsInsufficientArgsDoubleDefinition NoContextrun parseTokMparseTok parseTree parseFilerunFilerunTextmakeTreemadlangmadFile runMadlang fetchGithubinvalidinstallVimPlugin fetchPackages cleanPackagesPreTokProb $fEqStateT$fMonoidRandTokNameapply $fEqPreTok $fShowPreTokRandTokFListFValueFD:R:BaseRandTok dropExtensiongetDir.$ normalizecdfshow'parseErrorPretty'unTok readFile' customErrornoReturndoubleDefinition semErrStarttext'-ansi-wl-pprint-0.6.8.1-AloTw2NbGBFHl1luttZjPa%Text.PrettyPrint.ANSI.Leijen.InternalDoccheckSemanticshead'accesscheckKeysingleInstance noInstance$fExceptionSemanticError$fShowSemanticErrorParsershowCustomError headNoReturnmkCdf displayTree tokToTree cleanTree modifierListjumblestrip takeTemplate concatTokbuildTok buildTreebuildsortKeys orderKeys orderHelper maybeListallDepslexeme spaceConsumersymbolfloatinteger nonIndented indentGuardquotekeywordvardefinecatcategoryincludemainnamebaseGHC.BasereturnmodifierpreStrpairfunction inclusions definition preLibraryfinalprogram parseTreeM parseTokF parseTreeFparseInclusions spaceOnlylibrarygetInclusionCtx runInFolderparseCtxtemplate-haskellLanguage.Haskell.TH.Quote QuasiQuotertextToExpressionStringerrorgen $fMonadIOQcatchIOversionbindirlibdir dynlibdirdatadir libexecdir sysconfdir getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName SubcommandProgramorderstempsamplelintwrappertemplateDebugRunLintSampleGetInstall VimInstallinput_repclInputs_remotesubfetchdebug versionInfo