úÎ!f-`      None 479:=?HV ‡madlangHState monad providing context, i.e. function we've already called beforemadlang.datatype for a token returning a random stringmadlang$Pretoken, aka token as first read inmadlang dataype for a key aka token namemadlang0datatype for a double representing a probabilitymadlangMake 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")])madlang@Compare inside the state monad using only the underlying objects  !"#None>SXåmadlangDatatype for a semantic error$madlang5Throw custom error given by string, within the parser%madlangThrow  error within parser&madlang-Throws error when a function is defined twice'madlangConstant to start s(madlang Convert a Text to a ) for use with a pretty-printer*madlang*big semantics checker that sequences stuff+madlangfTake the head of the list, or throw the appropriate error given which functions we are trying to call.,madlang9Access argument, or throw error if the list is too short.-madlang'checker to verify there is at most one :return or  :define key statement.madlang Checks that we have at most one  `:return` template in the file/madlang+Checks that there are no instances of a key0madlangDerived via our show instance;1madlang display a ! nicely with coloration & whatnot  2*+3,Noney madlangDraw as a syntax Tree4madlangFunction to transform a 7 into a `Tree String` so that it can be pretty-printed. tokToTree 1.0 tok None=?: madlang"Get directory associated to a file5madlang0Normalize pre-tokens/corresponding probabilities6madlang-Helper function for creating a cdf from a pdf7madlangShow as a T.Text8madlangPretty-print a ParseError9madlangStrip a pre-token's name:madlangRead a file in as a Text 56789;:None#Smadlang 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 <madlang5Helper function to compute the cdf when we have a pdfNone,€ =madlang(A map with all the modifiers for Madlang>madlangJumble the words in a string?madlangStrip file extension@madlangGet the :return valueAmadlang(Convert the stuff after the number to a Bmadlang5Build token in tree structure, without concatenating.Cmadlang2Build the token without concatenating, yielding a # suitable to be printed as a tree.Dmadlang+Given keys naming the tokens, and lists of  , build our EmadlangPSort the keys that we have parsed so that dependencies are in the correct placesFmadlang.Ordering on the keys to account for dependency=>?@CDENoneH Gmadlang0Parse a lexeme, aka deal with whitespace nicely.Hmadlang*space consumer with awareness for commentsImadlang6parse a symbol, i.e. string plus surrouding whitespaceJmadlangParse a number/probabilityKmadlangParse an integerLmadlang-Make sure definition blocks start un-indentedMmadlang0Make contents of definition blocks are indented.NmadlangParse between quotesOmadlangParse a keywordPmadlang Parse a varQmadlang Parse the Q keyword.Rmadlang Parse the S keyword.Tmadlang Parse the T keyword.Umadlang Parse the  `:return` keyword.Vmadlang&Parse a template name (what follows a  `:define` or W block)XmadlangParse a modifierYmadlangParse template into a  of referents and stringsZmadlang*Parse a probability/corresponding template[madlangParse a function name for a  `:category` block.\madlang Parse an T]madlangParse a Q blockSmadlangParse a S block^madlangParse a  `:library` declaration_madlang Parse the  `:return` block`madlangParse the program in terms of  and the s to link them.madlangQParse text as a token + context (aka a reader monad with all the other functions)amadlangParse text as token + contextbmadlang!Parse text as a list of functionscmadlang@Parse text as a list of tokens, suitable for printing as a tree.madlangParse text given a context }import qualified Data.Text.IO as TIO getParsed = do f <- TIO.readFile "template.mad" parseTok "filename.mad" [] [] fmadlang8Parse text as a token, suitable for printing as a tree..dmadlangParse inclusionsmadlang!File name to use for parse errorsmadlang2Context, i.e. other random data paired with a key.madlang1list of variables to substitute into the templatemadlangActaul text to parsemadlangResultbcefd NoneRÐmadlangg 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 g or in spliced expressions.hmadlang Convert a i] containing to a `Q Exp` with the parsed syntax tree. Embedded code can contain inclusions.jmadlang_Turn a parse error into an error that will be caught when Template Haskell compiles at runtime.madlangSplice for embedding a '.mad' file, e.g. >demo :: IO T.Text demo = run $(madFile "twitter-bot.mad") %Embedded code can contain inclusions. None^ð madlangParse a template file into the  data typekmadlang'Generate text from file with inclusionsmadlangKCache the parsed strucutre (and libraries it depends on) as a binary file `.filename.mbc`(, reading instead from it when possible.madlang:Generate randomized text from a file containing a templatelmadlangRun n times.mmadlangRun in the appropriate foldermadlang-Run based on text input, with nothing linked.nmadlangGet file as contextmadlangBParse a template into a RandTok suitable to be displayed as a treemadlang)variables to substitute into the templatemadlangfoldermadlangfilepath within foldermadlangparsed madlang1List of variables to substitute into the templatemadlangPath to .mad file.madlangResultNone_?   o       ! " # $%&'()*+%,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvw xcdy z { | } ~'madlang-4.0.2.16-KOpr6Rg22IRBY5gVp5gm5y Text.MadlibsText.Madlibs.Internal.TypesText.Madlibs.Cata.SemErrText.Madlibs.Cata.DisplayText.Madlibs.Internal.UtilsText.Madlibs.Cata.RunText.Madlibs.Ana.ParseUtilsText.Madlibs.Ana.ParseText.Madlibs.Generate.THText.Madlibs.Ana.ResolveContextRandTokListValueKey SemanticErrorNoReturnCircularFunctionCallsInsufficientArgsDoubleDefinition NoContextImportNotFound displayTreegetDirrun parseTokMparseTok parseTreemadlangmadFile parseFile cacheFilerunFilerunFileNrunTextmakeTreePreTokProb$fMonoidRandTok $fEqStateTRandTokFValueFListFNameapply customErrornoReturndoubleDefinition semErrStarttext'+ansi-wl-pprint-0.6.9-Lno5n4I5UyW45g2Pd5KdsL%Text.PrettyPrint.ANSI.Leijen.InternalDoccheckSemanticshead'accesscheckKeysingleInstance noInstance$fExceptionSemanticError$fShowSemanticErrorParser headNoReturn tokToTree normalizecdfshow'errorBundlePretty'unTok readFile' readLibFilemkCdf modifierListjumblestrip takeTemplate concatTokbuildTok buildTreebuildsortKeys orderKeyslexeme spaceConsumersymbolfloatinteger nonIndented indentGuardquotekeywordvardefinecatcategoryincludemainnamebaseGHC.BasereturnmodifierpreStrpairfunction inclusions definition preLibraryfinalprogram parseTreeM parseTokF parseTreeFparseInclusionsparseTokInternalparseTokFInternaltemplate-haskellLanguage.Haskell.TH.Quote QuasiQuotertextToExpressionStringerrorgengetInclusionCtx runInFolderN runInFolderparseCtx