úÎhåa      None 2349;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 '"')&ÆAdd a PR for this? Could be useful in Megaparsec idk Allows us to use monoidal addition on parsers instance (Monoid a) => Monoid (Parser a) where mempty = pure mempty mappend x y = mappend  $ x  * y0Normalize 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 name+Read a file in as a Text #$%&'()*+ #$%&'()*+ #$%&'()*+None,-.,-.,-.None:Datatype for a semantic error/5Throw custom error given by string, within the parser0Throw  error within parser1-Throws error when a function is defined twice2Constant to start s3 Convert a Text to a 4 for use with a pretty-printer5*big semantics checker that sequences stuff6fTake the head of the list, or throw the appropriate error given which functions we are trying to call.79Access argument, or throw error if the list is too short.8'checker to verify there is at most one :return or  :define key statement9 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 =/>012356?789:;<  =56?7 =/>012356?789:;<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 @5Helper function to compute the cdf when we have a pdf @  @NoneADraw as a syntax TreeBFunction to transform a 7 into a `Tree String` so that it can be pretty-printed. tokToTree 1.0 tokACBAACBNone D(A map with all the modifiers for MadlangEJumble the words in a stringFStrip file extensionGGet the :return valueH(Convert the stuff after the number to a I5Build token in tree structure, without concatenating.J2Build the token without concatenating, yielding a # suitable to be printed as a tree.K+Given keys naming the tokens, and lists of  , build our LPSort the keys that we have parsed so that dependencies are in the correct placesM.Ordering on the keys to account for dependencyDEFGHIJKLNOPMQDEFGJKLDEFGHIJKLNOPMQ NoneR0Parse a lexeme, aka deal with whitespace nicely.S*space consumer with awareness for commentsT6parse a symbol, i.e. string plus surrouding whitespaceUParse a number/probabilityVParse an integerW-Make sure definition blocks start un-indentedX0Make contents of definition blocks are indented.YParse between quotesZParse a keyword[ Parse a var\ Parse the \ keyword.] Parse the ^ keyword._ Parse the _ keyword.` Parse the  `:return` keyword.a&Parse a template name (what follows a  `:define` or b block)cParse a modifierdParse template into a  of referents and stringse*Parse a probability/corresponding templatefParse a function name for a  `:category` block.g Parse an _hParse a \ block^Parse a ^ blocki Parse the  `:return` blockjParse 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)kParse text as token + contextl!Parse text as a list of functionsm@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" [] [] f 8Parse text as a token, suitable for printing as a tree..nParse inclustions RoSTUVWXYZ[\]_`acdefgh^ij klm !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 parseResult n lm n RoSTUVWXYZ[\]_`acdefgh^ij klm n None:Parse a template file into the  data typep'Generate text from file with inclusions:Generate randomized text from a file containing a templateqRun in the appropriate folder-Run based on text input, with nothing linked.rGet file as contextBParse a template into a RandTok suitable to be displayed as a tree)variables to substitute into the templatefolderfilepath within folderparsed p1List of variables to substitute into the templatePath to .mad file.Resultqrpqr Nones for an EDSL, e.g. xdemoQQ :: 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 s or in spliced expressions.t Convert a u6 containing to a `Q Exp` with the parsed syntax tree.v_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") 7Note that the embedded code cannot have any inclusions.tvtv Safewxyz{|}~€‚ƒ„…x€‚ƒ„…wxyz{|}~€‚ƒ„… 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 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     ™        ! "#$%&'(#)*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` a b c d e f g h i j k l m n o pqrs t u v w x y z { | } ~  €  ‚ ƒ„…† ‡qrˆ ‰ Š ‹ Œ  Ž   ‘ ’ “ ” • – — ˜ ™ š › œ  ž Ÿ   ¡ ¢ £ € ¥ Š § š š © ª«&madlang-3.0.0.3-6z4yFDxtmHk96eKkCdd80H Text.MadlibsText.Madlibs.Internal.TypesText.Madlibs.Internal.UtilsText.Madlibs.Exec.HelpersText.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.MainContextRandTokListValue SemanticErrorNoReturnCircularFunctionCallsInsufficientArgsDoubleDefinition NoContextrun parseTokMparseTok parseTree parseFilerunFilerunTextmakeTreemadlangmadFile runMadlangPreTokKeyProb $fEqStateT$fMonoidRandTokNameapply $fEqPreTok $fShowPreTokRandTokFListFValueFD:R:BaseRandTok dropExtensiongetDir.$ normalizecdfshow'parseErrorPretty'unTok readFile'installVimPlugin fetchPackages cleanPackages 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 hasNoDepsallDepsflattenlexeme spaceConsumersymbolfloatinteger nonIndented indentGuardquotekeywordvardefinecatcategoryincludemainnamebaseGHC.BasereturnmodifierpreStrpairfunction inclusions definitionfinalprogram parseTreeM parseTokF parseTreeFparseInclusions spaceOnlygetInclusionCtx runInFolderparseCtxtemplate-haskellLanguage.Haskell.TH.Quote QuasiQuotertextToExpressionStringerrorgencatchIOversionbindirlibdir dynlibdirdatadir libexecdir sysconfdir getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName SubcommandProgramorderstemplintwrappertemplateDebugRunLintInstall VimInstallinput_repclInputssubdebug versionInfo