úÎ!D_>‹I      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHSafe@ACIJKLMNOPSafe456 zinza/Some containers have location for each element.zinzaLocated element.zinzaLocation, line and column.zinzaUnknown location.zinzaPretty-print location.Safe ]Qzinza A very simple haskell expressionzinzaHaskell selector. zinza2Variable name, possibly a fieldname in the record.QR STUVSafe zinza Zinza types.The selectorGs tell how the Haskell value can be converted to primitive value. E.g.toType (Proxy :: Proxy Char)TyString (Just "return")Here, W converts X to Y. zinzaboolean zinzastring zinzalistszinzarecordsZzinzaCA record without fields is a unit type. Think of zero-field tuple: ().zinza Pretty print  . ZSafeÚzinzaTemplate values.zinzabooleanszinzastringszinzalistszinzarecords[zinza Calculate   of the d. This is only an approximation, for list we look at first element if it exists, otherwise we use unitTy.[SafeXMzinzaP 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 GenericMinstance Zinza R where toType = genericToTypeSFP; toValue = genericToValueSFP%displayTy $ toType (Proxy :: Proxy R)"{bar: String, foo: String}"\zinzaPairs are encoded as {key: k, val: v }Safe>HUVX"zinzaPField 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<newtype Wrapped = Wrap { unwrap :: String } deriving Generic2stripFieldPrefix (Proxy :: Proxy Wrapped) "unwrap""unwrap"zinzaGenerically derive  function.zinza with . zinzaGenerically derive  function.!zinza  with .zinza field renamer zinza field renamer  ! Safe456'"zinzaLocated expression.#zinzaExpressions in templates.KNote: there are only eliminators; we cannot construct "bigger" expressions.$zinzavariable%zinzafield accessor&zinzanegation]zinza Abstraction.^zinza Instantiate with a variable type_zinza` instance gives substitution."#$%&]^ Safe456+ü'zinzaTemplate parts.FWe use polymorphic recursion for de Bruijn indices. See materials on bound library.(zinzaraw text block)zinza expression  expr : String*zinzaconditional block,  expr : Bool+zinza for loop,  expr : List a,zinzacomments-zinza A list of 's.azinza Substitution.'()*+,-a Safe/0zinza%Class representing errors containing 2s.5Without bugs, compiled template should not throw any 2?s, as they are prevented statically, i.e. reported already as ;s../012765438:9;=<>?b Safe1¾czinzaHParse template into nodes. No other than syntactic checks are performed.czinzaname of the templatezinzacontents of the templatec SafeX3w@zinza"Configuration for module renderingBzinza module headerCzinzaname of the function@ABCdSafeX4Yezinzanodes with root objectfSafeX:çDzinza5Parse and compile the template into Haskell function.EzinzaLike D' but reads file and (possibly) throws 8.Fzinza$Parse and compile the template into Y representing a Haskell module.GzinzaLike F' but reads file and (possibly) throws 8.Hzinza!Simple configuration to use with F or G.Dzinzaname of the templatezinzacontents of the templateHzinza module namezinzaimportsI  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIDEFG@ABCH !'()*+,-#$%&" >?;<=89:23456701./ Safe>zgzinzaY writer monad.hzinzaGet the written string.izinzaTell Y.ghij !"#$%&'()*+,-./ 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L L M M N OPQRSTUVWXYZ[\]]^_`abcdefgbchijk l m nbco p q r stuvwxy zinza-0.1-CBFEctd3XALAzNsI4CMdxwZinzaZinza.Indexing Zinza.Pos Zinza.Var Zinza.Type Zinza.Value Zinza.Class Zinza.Generic Zinza.Expr Zinza.Node Zinza.Errors Zinza.Parser Zinza.Module Zinza.Check Zinza.WriterTraversableWithLoctraverseWithLocLocatedLLoczeroLoc displayLocSelectorVarTyTyBoolTyStringTyListTyRecord displayTyValueVBoolVStringVListVRecordtoType toTypeListtoValue toValueList GZinzaValue GZinzaType GFieldNamesstripFieldPrefix genericToTypegenericToTypeSFPgenericToValuegenericToValueSFPLExprExprEVarEFieldENotNodeNRawNExprNIfNForNCommentNodes ThrowRuntime throwRuntimeAsRuntimeErrorasRuntimeError RuntimeErrorNotBool NotString NotRecordNotListFieldNotInRecordCompileOrParseError ACompileError AParseError CompileErrorUnboundTopLevelVar ARuntimeError ParseError ModuleConfigmcHeadermcRenderparseAndCompileTemplateparseAndCompileTemplateIOparseAndCompileModuleparseAndCompileModuleIO simpleConfigCons:::IdxThereHereIndexingextractindexHsExprhsVaraccess accessMaybe displayHsExprbaseGHC.Basereturnghc-prim GHC.TypesCharStringtyUnit valueType $fZinzaMap abstract1instantiate1ret $fMonadExprMonad>>==errorLoc parseTemplate checkModule checkNodescheckWriter execWritertell