úÎīŽė:      !"#$%&'()*+,-./0123456789 :*Options passed to hexpat for XML parsing. ;&Character entity references for HTML. :;:; 1$TemplateMonad is the monad used for  processing. TemplateMonad  provides " passthrough"3 instances for many of the monads you might use in  the inner monad. <=JHolds all the state information needed for template processing. You will  build a  TemplateState using any of Heist's TemplateState m ->  TemplateState m "filter"( functions. Then you use the resulting   TemplateState in calls to renderTemplate. >?,A mapping of splice names to splice actions @)A mapping of template names to templates A#A flag to control splice recursion B4The path to the template currently being processed. CBA counter keeping track of the current recursion depth to prevent  infinite loops. D*A hook run on all templates at load time. E;A hook run on all templates just before they are rendered. F:A hook run on all templates just after they are rendered. G5The doctypes encountered during template processing. H*SpliceMap associates a name and a Splice. 7A Splice is a TemplateMonad computation that returns a . I#All templates are stored in a map. JCReversed list of directories. This holds the path to the template  currently being processed. KAn LK0 carries a doctype with it that we get from the + template at load time. The tricks that we're playing so templates don't I have to have a single root node screw up doctypes, so we have to handle  them manually. LMNA 5 is a forest of XML nodes. Here we deviate from the single root nodeB constraint of well-formed XML because we want to allow templates E to contain fragments of a document that may not have a single root. JHeist templates are XML documents. The hexpat library is polymorphic over * the type of strings, so here we define a  alias to fix the string * types of the tag names and tag bodies to O. PHThe Typeable instance is here so Heist can be dynamically executed with  Hint. QEEvaluates a template monad as a computation in the underlying monad. R)Helper function for the functor instance S Helper for MonadError instance. THelper for MonadCont instance. UHThe Typeable instance is here so Heist can be dynamically executed with  Hint. )Gets the node currently being processed.   <speech author="Shakespeare"> ! To sleep, perchance to dream.  </speech> When you call  getParamNode inside the code for the speech splice, it  returns the Node for the speech tag and its children. getParamNode >>=  getChildren returns a list containing one Text node containing part of  Hamlet' s speech. getParamNode >>= getAttribute "author" would return  Just  Shakespeare.  TemplateMonad's V.  TemplateMonad's W.  TemplateMonad's X.  TemplateMonad's Y.  TemplateMonad's Z. BRestores the components of TemplateState that can get modified in : template calls. You should use this function instead of putTS to restore B an old state. Thas was needed because doctypes needs to be in a  global scope! as opposed to the template call  local scope of state items such / as recursionDepth, curContext, and spliceMap. [MonadCont passthrough instance \ MonadError passthrough instance ]!MonadReader passthrough instance ^ MonadState passthrough instance _MonadPlus passthrough instance `!Alternative passthrough instance aMonadFix passthrough instance bMonadTrans instance cMonadIO instance dMonad instance eApplicative instance fFunctor instance %<=>?@ABCDEFGHIJKLMNPQRSTU %<=<= >?@ABCDEFG>?@ABCDEFGHIJKLMNLMNPQRSTU  $Default name for the ignore splice. =The ignore tag and everything it surrounds disappears in the  rendered output.     &Default name for the markdown splice. 'Implementation of the markdown splice. command to run any arguments standard input exitcode, stdout, stderr    4gDAST to hold attribute parsing structure. This is necessary because  attoparsec doesn',t support parsers running in another monad. hij!Mappends a doctype to the state. Adds an on-load hook to a . Adds a pre-run hook to a . Adds a post-run hook to a . 6Binds a new splice declaration to a tag name within a .  tag name splice action  source state 0Binds a set of new splice declarations within a . splices to bind  start state .Convenience function for looking up a splice. kHConverts a path into an array of the elements in reverse order. If the I path is absolute, we need to remove the leading slash so the split doesn't  leave ""# as the last element of the TPath. FIXME ".." currently doesn'-t work in paths, the solution is non-trivial lIConverts a path into an array of the elements in reverse order using the 3 path separator of the local operating system. See k for more  details. mGConverts a path into an array of the elements in reverse order using a  forward slash (/) as the path separator. See k for more  details. n4Does a single template lookup without cascading up. oNSearches for a template by looking in the full path then backing up into each 8 of the parent directories until the template is found. Returns p; if the given template can be found in the template state. q0Convenience function for looking up a template. )Sets the templateMap in a TemplateState. r'Adds a template to the template state. 'Adds a template to the template state. CStops the recursive processing of splices. Consider the following  example:   <foo>  <bar>  ...  </bar>  </foo>  Assume that "foo"- is bound to a splice procedure. Running the foo ' splice will result in a list of nodes L . Normally foo will recursively  scan L for splices and run them. If foo calls  stopRecursion, L F will be included in the output verbatim without running any splices. sSets the current context !Gets the current context t-Performs splice processing on a single node. uFHelper function for substituting a parsed attribute into an attribute  tuple. v@Parses an attribute for any identifier expressions and performs  appropriate substitution. w,Parser for attribute variable substitution. xGet'%s the attribute value. If the splice' s result list contains non-text F nodes, this will translate them into text nodes with textContent and  concatenate them together. :Originally, this only took the first node from the splices's result list, E and only if it was a text node. This caused problems when the splice's K result contained HTML entities, as they would split a text node. This was J then fixed to take the first consecutive bunch of text nodes, and return K their concatenation. This was seen as more useful than throwing an error, A and more intuitive than trying to render all the nodes as text. HHowever, it was decided in the end to render all the nodes as text, and - then concatenate them. If a splice returned  "some <b>text</b> foobar"', the user would almost certainly want  "some text foobar"/ to be rendered, and Heist would probably seem J annoyingly limited for not being able to do this. If the user really did  want it to render "some "*, it would probably be easier for them to K accept that they were silly to pass more than that to be substituted than 0 it would be for the former user to accept that  "some <b>text</b> foobar" is being rendered as "some " because  it's "more intuitive". "/Performs splice processing on a list of nodes. y@The maximum recursion depth. (Used to prevent infinite loops.) zFChecks the recursion flag and recurses accordingly. Does not recurse : deeper than mAX_RECURSION_DEPTH to avoid infinite loops. {ALooks up a template name runs a TemplateMonad computation on it. #>Looks up a template name evaluates it by calling runNodeList. |ILooks up a template name evaluates it by calling runNodeList. This also 8 executes pre- and post-run hooks and adds the doctype. $)Binds a list of constant string splices. %'Binds a single constant string splice. &HRenders a template with the specified parameters. This is the function  to use when you want to call. a template and pass in parameters from code. The name of the template Association list of  (name,value) parameter pairs }JConverts a Template to an InternalTemplate. This can only be done inside / TemplateMonad where the doctype is available. ~DRenders an internal template by prepending the appropriate doctype. '5Renders a template from the specified TemplateState. (Turns an in-memory XML/!XHTML bytestring into a (doctype,'[Node]') pair. )!Reads an XML document from disk. -Checks whether the bytestring has a doctype. €AConverts a ByteString into a tuple containing a possible doctype * ByteString and the rest of the document. ‚ƒ<Loads a template with the specified path and filename. The % template is only loaded if it has a .tpl extension. path of the template root ,full file path (includes the template root) *9Traverses the specified directory structure and builds a / TemplateState by loading all the files with a .tpl extension. „CReversed list of directories. This holds the path to the template …5Runs the onLoad hook on the template and returns the   with the result inserted. †‡4ghijklmnoqr s!tuvwx"yz{#|$%&}~'()€‚ƒ*„…†‡4gihhijklmnoqr s!tuvwx"yz{#|$%&}~'()€‚ƒ*„…†‡+#Default name for the apply splice. ,*Default attribute name for the apply tag. -$Implementation of the apply splice. +,-+,-+,-."Default name for the bind splice. /)Default attribute name for the bind tag. 0#Implementation of the bind splice. ./0./0./01)State for storing static tag information ˆ2Clears the static tag state. ‰The "static"> splice ensures that its contents are evaluated once and then D cached. The cached contents are returned every time the splice is  referenced. 3&Modifies a TemplateState to include a "static" tag. The static tag is M not bound automatically with the other default Heist tags. This is because H this function also returns StaticTagState, so the user will be able to  clear it with the 2 function. 123132123  +,-./0123Š%The default set of built-in splices. 4#An empty template state, with Heist's default splices (<apply>,  <bind>, <ignore>, and <markdown>) mapped. The static tag is I not mapped here because it must be mapped manually in your application. "  !"#$%&'()*34"4* "! #&'$%)(345-Structure representing a template directory. ‹6Creates and returns a new 5 wrapped in an Either for  error handling. 7Creates and returns a new 5, using the monad's fail  function on error. 8 Gets the  from a TemplateDirectory. 97Clears cached content and reloads templates from disk. ŒPrepends an error onto a Left. 567895678956789             ! " # $ % & ' ( ) * + , - . / 0 1 2 3 456789:;<=>?@ABCDE  F  G H I J K L M N O P Q R S S T UVWX Y Z [ \ ] ^_`a_bc_bd_be_bf g h i j k l m n o p q r s t u v w x y z {|}~  €  ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ Œ  Ž   ‘ ’ “ ” •–—˜?™š heist-0.2.3Text.Templating.Heist$Text.Templating.Heist.Splices.Ignore&Text.Templating.Heist.Splices.Markdown#Text.Templating.Heist.Splices.Apply"Text.Templating.Heist.Splices.Bind$Text.Templating.Heist.Splices.Static'Text.Templating.Heist.TemplateDirectoryText.Templating.Heist.ConstantsText.Templating.Heist.TypesText.Templating.Heist.InternalText.Templating.Heist.Splices TemplateMonad TemplateStateSpliceTemplateNode getParamNodelocalParamNodegetsTSgetTSputTSmodifyTS restoreTS ignoreTag ignoreImplMarkdownExceptionPandocMissingException markdownTagmarkdownSplicepandocpandocBSreadProcessWithExitCode' addOnLoadHook addPreRunHookaddPostRunHook bindSplice bindSplices lookupSplice hasTemplate setTemplates addTemplate stopRecursion getContext runNodeList evalTemplate bindStrings bindString callTemplaterenderTemplateparseDocgetDoc loadTemplatesapplyTag applyAttr applyImplbindTagbindAttrbindImplStaticTagStateclearStaticTagCache bindStaticTagemptyTemplateStateTemplateDirectorynewTemplateDirectorynewTemplateDirectory'getDirectoryTSreloadTemplateDirectoryheistExpatOptionshtmlEntityLookupTablerunTemplateMonad _spliceMap _templateMap_recurse _curContext_recursionDepth _onLoadHook _preRunHook _postRunHook _doctypes SpliceMap TemplateMapTPathInternalTemplate _itDoctype_itNodesbytestring-0.9.1.7Data.ByteString.Internal ByteStringtemplateStateTyConevalTemplateMonadfirst liftCatch liftCallCCtemplateMonadTyConmonads-fd-0.1.0.1Control.Monad.Reader.ClasslocalControl.Monad.State.Classgetsgetputmodify$fMonadContTemplateMonad$fMonadErroreTemplateMonad$fMonadReaderrTemplateMonad$fMonadStatesTemplateMonad$fMonadPlusTemplateMonad$fAlternativeTemplateMonad$fMonadFixTemplateMonad$fMonadTransTemplateMonad$fMonadIOTemplateMonad$fMonadTemplateMonad$fApplicativeTemplateMonad$fFunctorTemplateMonadAttASTIdentLiteral addDoctype splitPathWithsplitLocalPathsplitTemplatePath singleLookup traversePathghc-primGHC.BoolTruelookupTemplateinsertTemplate setContextrunNodeattSubstparseAtt attParsergetAttributeSplicemAX_RECURSION_DEPTH recurseSplice lookupAndRun evalWithHookstoInternalTemplaterenderInternal hasDoctypeextractDoctypemapLeftmapRight loadTemplaterunHookInternalloadHook formatList formatList'STS staticImpldefaultSpliceMapleftPass