u^&      !"#$%  Safe-Inferred&'()*+,-&)*+&(')*+,- Safe-InferredRThis is the class of all types that can be used as values in the context. You can ? create additional ones, although we strictly discourage that. KThis function is something you should implement yourself, if you decide to  create your own instance of %. It converts the given value to the N element that could be used in the context. Normally you can just go with the  4 operator without calling this function explicitly. .This function is here for the same reason the . function is in the  / class   to allow 0-s, which are lists of characters, to be used  differently from other lists. -If you decide to create your own instance of , there is no need to @ implement this function, as it has the default implementation. 'This is the type of contexts. The type 'a' here doesn' t matter; it's only present ) so that it would be possible to use the 'do' syntax. OThis is a universal type for everything that can be assigned to a field in the  context. Normally you won'5t need this, and this type is subject to change, so,  it'Ms internals are hidden. The only way to create values of this type is to use  the  (or the @) function. The only way to use them is to insert them into the   with the - operator and then render into the template. NOne possible use of this type is to create a heterogeneous array. If you want O an array in your context, containing, for example, both strings and booleans,  you can do it like that: '[ec "foo" , ec True]'. An only -specific operator. ' name =: value' tells render that 'value' should be substituted for  'name' in a template. KThis function is here for convenience only. If you have a list of elements T that can be inserted in the template, this function gives you an array of records, Y one for each element of the original list, where each record contains the corresponding  element in it's 'item'+ field. Additionally, it gives you boolean 'first' and  'last'H fields, true for the first and last elements of the list respectively,  and the 'only'G field that is true if and only if the list contains just one element. 123456789:;<=>?@A2345678154326789:;<=>?@A Safe-Inferred3This type indicates some position in the template. OThis function is used by Plat to display the position. It gives you the record  with two fields, "line" and "column",, indicating the line number and the column  number respectively.     Safe-Inferred ?This type represents a rendering error. Note that we provide a  function @ which can be used if you want to present an error to the user. TThis type internals are exposed for you to pattern-match on them, although they can  change in the future versions. PTemplate asks to check for some boolean expression, which happened to be false. SThere are several options in the template, but all of them failed for some reason. 0Error messages for all options are listed here. The expression can'<t be evaluated, since there is no field with the given name  in the record. 9The expression evaluates to something of the wrong type. JHere, first type is the actual one, while the second is the expected one. IThis is an auxiliary type, which indicates what is the type we expected,  or what is the actual type we've got. This function is similar to  templateErr,. It allows you to show the rendering error @ to the user. The context it generates always has a value named "pos" , indicating Y the position where an error occured; if multiple branches failed, there is also a value  "endpos"N, which indicates the position where the list of branches ends. Positions are  presented with the   function. GOther field depend on the error. For a type mismatch, there are values "expected" and  "actual", which are the strings 'string', 'boolean', 'array' or 'record', M depending on what type the value should have and what type it actually has;  there is also the "expr"8 field, which presents the list of names in the failing  expression with the function . If the required field wasn'/t found in the record, then there is the value "field", C which is a list of names in the failing expression, and the value "type", which . shows what type that expression should have. GIf there were multiple branches, all of them failing, then, apart from "pos" and  "endpos"H fields, there is a list of errors, one for each of the branches. These  errors are presented using the  function recursively. SFinally, if the boolean value was checked and happened to be false, there would be  the field "check"<, which, again, is a list of names in the expression, which  evaluated to false.  BCD   BCD Safe-Inferred%EFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi JKLMNOPQRSTUVWXYiEHGFIJPONMLKQTSRUYXWVZ[\]^_`abcdefghi Safe-Inferred 1This is a type of error messages you get when you're trying to compile ' a syntactically incorrect template. It's quite possible that you' ll want to  pattern-match on it, so it'5s internals are completely exposed, althoug it might A change in future versions. Note that we also provide a function !, B which allows you to display errors with any formatting you like. JThere is an opening command and a closing command, and they should match,  but they don't. 3If, for example, you close a branching, started by '@{' command, with '@]'  command, you get this error. PThere are two positions in this error message; the first is the position of the E opening command, and the second is the position of the closing one. <There is an opening command without a matching closing one. HThere is a command which should follow a specific opening command, like '@{'  or '@['%, but the latter could not be found. !For example, if your template is 'foo@|' , then that's an error you'll get,  as '@|' command should be between '@{' and '@}'. LThis is the part of an error message which represents an erroneous command, 0 which should follow some specific opening one. There is an error with the '@]' command. There is an error with the '@|' command. There is an error with the '@}' command. LThis is the part of an error message, which represents an erroneous opening  command. There is an error with the '@[' command. There is an error with the '@{' command. !OIf you want to present your error to the user for some reason, you can do this  with Plat itself. You'<ll need to create a template, as only you can know for sure R how this error message should be rendered, but the context is here. It gives you  "left" (respectively "right"1) field if there is the problem with the opening K (respectively closing or separating) command, which is also a record with  "loop", "try" and "or"0 boolean fields (the latter being absent in the  "left"? record) whose values depend on the command in question, and a "pos" field , indicating the position of this command. It's possible to have both "left" and  "right"F fields present, if there are an opening and closing commands that don't % match; obviously, in this case both "left" and "right" fields would have there  own "pos" subfields. 'The position(s) is presented using the   function.  jk!lmn  !  jk!lmn Safe-Inferred"PBefore using the template, it should be compiled, so that compilation would not S happen each time the template is used. This is the type of the compiled template.  It's internals aren'>t exported, as they are subject to change in future versions. #MThis is a compilation function. It returns error message if the input string  has syntax errors. $HThis function is provided for convenience only. It does the same as the  #= function, except that instead of returning an error message R it just throws a run-time error with the textual representation of that message. opqrstuvwxy"z{#$  !tuvwxy"z#$oqprstyxwvu"z{#$  Safe-Inferred%FThis is the rendering functions. It substitutes values from the given   into the ", returning result as | or indicating a failure. }~% %}~% Safe-Inferred&  !"#$%&"#$ !%         !"#$%&'()*+,-. /0102345678978:7;< =>?@AABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{||}~,  plat-0.1.0.1Plat Plat.Errors Plat.Context Plat.UtilsPlat.Rendering.ErrorsPlat.Template.CommandPlat.Template.Errors Plat.TemplatePlat.RenderingElementCececsContextContextElement=: listValuesPos CharNumber LineNumber posContext RenderErr ErrorCheck ErrorOption ErrorField ErrorType ContextTypeCtxArray CtxRecordCtxBool CtxString renderErr TemplateErrMismatchedTags NoRightTag NoLeftTagTemplateErrRight LoopRightTag OrRightTag TryRightTagTemplateErrLeft LoopLeftTag TryLeftTag templateErrTemplate templateEtemplaterenderErrorsResultthrowE runErrorsmapE$fMonadPlusErrors $fMonadErrorsbaseGHC.ShowshowListShowGHC.BaseString BoolContext SubContext ListContext StringContextCtxcontextflo$fElementCContextElement$fElementCByteString $fElementC[]$fElementCContext$fElementCBool$fElementCChar$fMonadContext $fMonoidCtxshowBS$fShowRenderErr$fShowContextType LineState RegularLine CommandLine BlankLine TemplateMonadControlCommand EndLoopCmdLoopCmdGuardCmdOrCmd EndTryCmdTryCmd SimpleCommandAtCmdNopCmd StringCmdCommandLineCmdSubstCmd ControlCmd SimpleCmdtoStrictisControlCommandtrimdotscharposconsumeexprChareol oneCommand allCommandstemplateCommands trimCommands lineState fixCommandscommandsleftErightE$fShowTemplateErr$fShowTemplateErrRight$fShowTemplateErrLeft ReadingState ReadingOption ReadingLoopPartialTemplateElement CheckTemplateOptionTemplate LoopTemplate ExprTemplateStringTemplate addCommandbytestring-0.10.0.0Data.ByteString.Lazy.Internal ByteStringRenderMemptyStrnotStr fromStrict runListReader renderSuffix renderElementevalExpr makeError getSubElement getStringloopOver renderBindcheckVal