h*W      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV0.2.1 Safe-InferredWXYZ[\]^ Safe-Inferred9:;zinza/Some containers have location for each element.zinzaLocated element.zinzaLocation, line and column.zinzaUnknown location.zinzaPretty-print location. Safe-InferredD_zinza A very simple haskell expressionzinzaHaskell selector. zinza2Variable name, possibly a fieldname in the record. _`ab cdef Safe-Inferred- zinza Zinza types.The selectors tell how the Haskell value can be converted to primitive value. E.g.toType (Proxy :: Proxy Char)TyString (Just "return")Here, g converts h to i. zinzaboolean zinzastring zinzalistszinzarecordszinza functionsjzinzaA record without fields is a unit type. Think of zero-field tuple: ().zinza Pretty print  . j Safe-Inferred9:;zinzaLocated expression.zinzaExpressions in templates.Note: there are only eliminators; we cannot construct "bigger" expressions.zinzavariablezinzafield accessorzinzafunction applicationkzinza Abstraction.lzinza Instantiate with a variable typemzinzan instance gives substitution.kl Safe-Inferred9:;n zinzaTemplate parts.We use polymorphic recursion for de Bruijn indices. See materials on bound library.zinzaraw text blockzinza expression  expr : Stringzinzaconditional block,  expr : Boolzinza for loop,  expr : List azinza define blockzinza use blockzinzacommentszinza A list of s.ozinza Substitution. o  Safe-Inferred a!zinza%Class representing errors containing #s.5Without bugs, compiled template should not throw any #?s, as they are prevented statically, i.e. reported already as /s. !"#+*)('&%$,.-/321045p  Safe-Inferred 6zinzaTemplate values.7zinzabooleans8zinzastrings9zinzalists:zinzarecords;zinzafunctionqzinza Calculate   of the 6. This is only an approximation, for list we look at first element if it exists, otherwise we use unitTy.6;:987q  Safe-Inferred rzinzaParse template into nodes. No other than syntactic checks are performed.rzinzaname of the templatezinzacontents of the templater  Safe-Inferred9<zinza< class tells how to convert the type into template parameters, and their types.,Class can be auto-derived for product types.data R = R { recFoo :: String, recBar :: Char } deriving Genericinstance Zinza R where toType = genericToTypeSFP; toValue = genericToValueSFP; fromValue = genericFromValueSFP%displayTy $ toType (Proxy :: Proxy R)"{bar: String, foo: String}"szinzaPairs are encoded as { key: k, val: v }tzinzaThe A9 for function produces partial functions. Use with care.This means that higher order functions in templates might throw pure exception. They wont, if they are well-typed.<=>?@AB  Safe-InferredCzinza"Configuration for module renderingEzinza module headerFzinzaname of the functionuCDEF Safe-InferredKzinzaField renamer which will automatically strip lowercase prefix from field names.=data R = R { recFoo :: Int, recBar :: Char } deriving Generic,stripFieldPrefix (Proxy :: Proxy R) "recFoo""foo".If whole field is lower case, it's left intact?@ABJKILMHNOGPQ Safe-Inferredvzinzanodes with root objectw!GPL-2.0-or-later AND BSD-3-Clause Safe-InferredRzinza5Parse and compile the template into Haskell function.SzinzaLike R' but reads file and (possibly) throws ,.Tzinza$Parse and compile the template into i representing a Haskell module.UzinzaLike T' but reads file and (possibly) throws ,.Vzinza!Simple configuration to use with T or U.Rzinzaname of the templatezinzacontents of the templateVzinza module namezinzaimportsRSTUCDEFV<=>?@ABLNPMOQKIHGJ 6789:;45/0123,-.#$%&'()*+!"  RSTUCDEFV<=>?@ABLNPMOQKIHGJ 6789:;45/0123,-.#$%&'()*+!"   Safe-InferredOxzinzai writer monad.yzinzaGet the written string.zzinzaTell i.xyz !"#$%&'()*+,-. / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D D E F G H I J  K L M N O P Q Q R STUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxytuz{|}~tu      "zinza-0.2.1-8iJCpZ6KrAnHfHm1euJe1iZinzazinzaZinza.Indexing Zinza.Pos Zinza.Var Zinza.Type Zinza.Expr Zinza.Node Zinza.Errors Zinza.Value Zinza.Parser Zinza.Class Zinza.Module Zinza.Generic Zinza.Check Zinza.WriterTraversableWithLoctraverseWithLocLocatedLLoczeroLoc displayLocSelectorVarTyTyBoolTyStringTyListTyRecordTyFun displayTyLExprExprEVarEFieldEAppNodeNRawNExprNIfNFor NDefBlock NUseBlockNCommentNodes ThrowRuntime throwRuntimeAsRuntimeErrorasRuntimeError RuntimeErrorNotBool NotString NotRecordNotListFieldNotInRecord NotFunctionFunArgDontMatch CustomErrorCompileOrParseError ACompileError AParseError CompileErrorUnboundTopLevelVarShadowingBlockUnboundUseBlock ARuntimeError ParseErrorValueVBoolVStringVListVRecordVFuntoType toTypeListtoValue toValueList fromValue fromValueList ModuleConfigmcHeadermcRender GZinzaFrom GZinzaValue GZinzaType GFieldNamesstripFieldPrefix genericToTypegenericToTypeSFPgenericToValuegenericToValueSFPgenericFromValuegenericFromValueSFPparseAndCompileTemplateparseAndCompileTemplateIOparseAndCompileModuleparseAndCompileModuleIO simpleConfigCons:::IdxThereHereIndexingextractindexHsExprHsSelHsVarHsApphsVaraccess accessMaybe displayHsExprbaseGHC.Basereturnghc-prim GHC.TypesCharStringtyUnit abstract1instantiate1ret $fMonadExprMonad>>==errorLoc valueType parseTemplate $fZinzaMap $fZinzaFUN checkModule checkNodescheckWriter execWritertell