[{"name":"Elm.CodeGen","comment":" Elm.CodeGen is a DSL designed to make it easier to write Elm code that generates Elm code.\n\n\n# Build an Elm source file.\n\n@docs file\n\n\n# Build a module declaration.\n\n`elm-syntax` also permits effects modules, but with kernel code restrictions you cannot use these so\nthey have been ommitted from the DSL.\n\n@docs normalModule, portModule\n\n\n# Build an 'exposing' statement.\n\n@docs exposeAll, exposeExplicit\n@docs closedTypeExpose, funExpose, openTypeExpose, typeOrAliasExpose\n\n\n# Build an import statement.\n\n@docs importStmt\n\n\n# Incrementally build import and exposing statements.\n\nThis is useful during code generation where the exact imports and exports are not known in advance\nbut depend on what code is actually generated. Each section of code generation can declare the imports and\nexposings that it needs and they can be combined and de-duplicated to produce a final list.\n\nI have used the name `Linkage` to refer to the combination of a modules imports and exports. It describes\nhow a module is linked to other modules.\n\n@docs Linkage, addExposing, addImport, combineLinkage, emptyLinkage\n\n\n# Build top-level declarations.\n\n@docs aliasDecl, customTypeDecl, funDecl, patternDecl, portDecl\n\n\n# Build an expression.\n\n@docs access, accessFun, apply, caseExpr, char, float, fqFun, fqVal, fun, glsl, hex\n@docs ifExpr, int, lambda, letExpr, list, negate, op, opApply, parens, prefixOp, record\n@docs string, tuple, unit, update, val\n\n\n# Helper functions for common expression patterns.\n\n@docs chain, pipe\n\n\n# Build a pattern matching expression.\n\n@docs allPattern, asPattern, charPattern, floatPattern, fqNamedPattern, hexPattern, intPattern\n@docs listPattern, namedPattern, parensPattern, recordPattern, stringPattern, tuplePattern, unConsPattern\n@docs unitPattern, varPattern\n\n\n# Build a type annotation.\n\n@docs extRecordAnn, fqTyped, funAnn, recordAnn, tupleAnn, typeVar, typed, unitAnn\n@docs boolAnn, intAnn, floatAnn, stringAnn, charAnn\n@docs listAnn, setAnn, dictAnn, maybeAnn\n\n\n# Build a type signature.\n\n@docs signature\n\n\n# Types describing parts of the Elm AST.\n\nThese types are all declared in `elm-syntax` but are re-exported here for convenience.\n\n@docs ModuleName, Module, File, Declaration, Import, TypeAnnotation\n@docs Exposing, TopLevelExpose, Expression, Pattern\n\n","unions":[],"aliases":[{"name":"Declaration","comment":" The AST for a top-level Elm declaration; a function, a value, a type or a\ntype alias.\n","args":[],"type":"Elm.Syntax.Declaration.Declaration"},{"name":"Exposing","comment":" The AST for an Elm exposing statement.\n","args":[],"type":"Elm.Syntax.Exposing.Exposing"},{"name":"Expression","comment":" The AST for an Elm expression.\n","args":[],"type":"Elm.Syntax.Expression.Expression"},{"name":"File","comment":" The AST for an Elm file.\n","args":[],"type":"Elm.Syntax.File.File"},{"name":"Import","comment":" The AST for an Elm import statement.\n","args":[],"type":"Elm.Syntax.Import.Import"},{"name":"Linkage","comment":" Linkage describes the lists of imports and exposings of a module and allows\nthese to be built up incrementally as code generation progresses.\n","args":[],"type":"( List.List Elm.CodeGen.Import, List.List Elm.CodeGen.TopLevelExpose )"},{"name":"Module","comment":" The AST for an Elm module.\n","args":[],"type":"Elm.Syntax.Module.Module"},{"name":"ModuleName","comment":" A module name can consist of mulitple Stirngs separated with '.'.\n","args":[],"type":"List.List String.String"},{"name":"Pattern","comment":" The AST for a de-structuring Elm pattern matching expression.\n","args":[],"type":"Elm.Syntax.Pattern.Pattern"},{"name":"TopLevelExpose","comment":" The AST for a member of an Elm exposing statement.\n","args":[],"type":"Elm.Syntax.Exposing.TopLevelExpose"},{"name":"TypeAnnotation","comment":" The AST for an Elm type annotation.\n","args":[],"type":"Elm.Syntax.TypeAnnotation.TypeAnnotation"}],"values":[{"name":"access","comment":" RecordAccess (Node Expression) (Node String)\n","type":"Elm.CodeGen.Expression -> String.String -> Elm.CodeGen.Expression"},{"name":"accessFun","comment":" RecordAccessFunction String\n","type":"String.String -> Elm.CodeGen.Expression"},{"name":"addExposing","comment":" Adds an exposing to the list.\n","type":"Elm.CodeGen.TopLevelExpose -> Elm.CodeGen.Linkage -> Elm.CodeGen.Linkage"},{"name":"addImport","comment":" Adds an import to the list.\n","type":"Elm.CodeGen.Import -> Elm.CodeGen.Linkage -> Elm.CodeGen.Linkage"},{"name":"aliasDecl","comment":" AliasDeclaration TypeAlias\n","type":"Maybe.Maybe String.String -> String.String -> List.List String.String -> Elm.CodeGen.TypeAnnotation -> Elm.CodeGen.Declaration"},{"name":"allPattern","comment":" AllPattern\n","type":"Elm.CodeGen.Pattern"},{"name":"apply","comment":" Application (List (Node Expression))\n","type":"List.List Elm.CodeGen.Expression -> Elm.CodeGen.Expression"},{"name":"asPattern","comment":" AsPattern (Node Pattern) (Node String)\n","type":"Elm.CodeGen.Pattern -> String.String -> Elm.CodeGen.Pattern"},{"name":"boolAnn","comment":" A `Bool` type annotation.\n","type":"Elm.CodeGen.TypeAnnotation"},{"name":"caseExpr","comment":" CaseExpression CaseBlock\n","type":"Elm.CodeGen.Expression -> List.List ( Elm.CodeGen.Pattern, Elm.CodeGen.Expression ) -> Elm.CodeGen.Expression"},{"name":"chain","comment":" Joins multiple expressions together with the function chain operator `>>`. An\nexpression `a` combined with a list of expressions `[b, c, d]` results in:\n\n    a >> b >> c >> d\n\n","type":"Elm.CodeGen.Expression -> List.List Elm.CodeGen.Expression -> Elm.CodeGen.Expression"},{"name":"char","comment":" CharLiteral Char\n","type":"Char.Char -> Elm.CodeGen.Expression"},{"name":"charAnn","comment":" A `Char` type annotation.\n","type":"Elm.CodeGen.TypeAnnotation"},{"name":"charPattern","comment":" CharPattern Char\n","type":"Char.Char -> Elm.CodeGen.Pattern"},{"name":"closedTypeExpose","comment":" TypeExpose ExposedType\n","type":"String.String -> Elm.CodeGen.TopLevelExpose"},{"name":"combineLinkage","comment":" Simplifies the imports and exposings by removing any duplicates.\n","type":"List.List Elm.CodeGen.Linkage -> Elm.CodeGen.Linkage"},{"name":"customTypeDecl","comment":" CustomTypeDeclaration Type\n","type":"Maybe.Maybe String.String -> String.String -> List.List String.String -> List.List ( String.String, List.List Elm.CodeGen.TypeAnnotation ) -> Elm.CodeGen.Declaration"},{"name":"dictAnn","comment":" Creates a `Dict` type annotation.\n","type":"Elm.CodeGen.TypeAnnotation -> Elm.CodeGen.TypeAnnotation -> Elm.CodeGen.TypeAnnotation"},{"name":"emptyLinkage","comment":" Creates empty imports and exposings lists.\n","type":"Elm.CodeGen.Linkage"},{"name":"exposeAll","comment":" All Range\n","type":"Elm.CodeGen.Exposing"},{"name":"exposeExplicit","comment":" Explicit (List (Node TopLevelExpose))\n","type":"List.List Elm.CodeGen.TopLevelExpose -> Elm.CodeGen.Exposing"},{"name":"extRecordAnn","comment":" GenericRecord (Node String) (Node RecordDefinition)\n","type":"String.String -> List.List ( String.String, Elm.CodeGen.TypeAnnotation ) -> Elm.CodeGen.TypeAnnotation"},{"name":"file","comment":" Assembles all the components of an Elm file; the module declaration, the\ncomments, the imports and the top-level declarations.\n","type":"Elm.CodeGen.Module -> List.List Elm.CodeGen.Import -> List.List Elm.CodeGen.Declaration -> List.List String.String -> Elm.CodeGen.File"},{"name":"float","comment":" Floatable Float\n","type":"Basics.Float -> Elm.CodeGen.Expression"},{"name":"floatAnn","comment":" A `Float` type annotation.\n","type":"Elm.CodeGen.TypeAnnotation"},{"name":"floatPattern","comment":" FloatPattern Float\n","type":"Basics.Float -> Elm.CodeGen.Pattern"},{"name":"fqFun","comment":" FunctionOrValue ModuleName String\n","type":"Elm.CodeGen.ModuleName -> String.String -> Elm.CodeGen.Expression"},{"name":"fqNamedPattern","comment":" NamedPattern QualifiedNameRef (List (Node Pattern))\n","type":"Elm.CodeGen.ModuleName -> String.String -> List.List Elm.CodeGen.Pattern -> Elm.CodeGen.Pattern"},{"name":"fqTyped","comment":" Typed (Node ( ModuleName, String )) (List (Node TypeAnnotation))\n","type":"Elm.CodeGen.ModuleName -> String.String -> List.List Elm.CodeGen.TypeAnnotation -> Elm.CodeGen.TypeAnnotation"},{"name":"fqVal","comment":" FunctionOrValue ModuleName String\n\nNote this is the same as `fqFun`\n\n","type":"Elm.CodeGen.ModuleName -> String.String -> Elm.CodeGen.Expression"},{"name":"fun","comment":" Creates a FunctionOrValue with no qualifiying module.\n","type":"String.String -> Elm.CodeGen.Expression"},{"name":"funAnn","comment":" FunctionTypeAnnotation (Node TypeAnnotation) (Node TypeAnnotation)\n","type":"Elm.CodeGen.TypeAnnotation -> Elm.CodeGen.TypeAnnotation -> Elm.CodeGen.TypeAnnotation"},{"name":"funDecl","comment":" FunctionDeclaration Function\n","type":"Maybe.Maybe String.String -> Maybe.Maybe Elm.Syntax.Signature.Signature -> String.String -> List.List Elm.CodeGen.Pattern -> Elm.CodeGen.Expression -> Elm.CodeGen.Declaration"},{"name":"funExpose","comment":" FunctionExpose String\n","type":"String.String -> Elm.CodeGen.TopLevelExpose"},{"name":"glsl","comment":" GLSLExpression String\n","type":"String.String -> Elm.CodeGen.Expression"},{"name":"hex","comment":" Hex Int\n","type":"Basics.Int -> Elm.CodeGen.Expression"},{"name":"hexPattern","comment":" HexPattern Int\n","type":"Basics.Int -> Elm.CodeGen.Pattern"},{"name":"ifExpr","comment":" IfBlock (Node Expression) (Node Expression) (Node Expression)\n","type":"Elm.CodeGen.Expression -> Elm.CodeGen.Expression -> Elm.CodeGen.Expression -> Elm.CodeGen.Expression"},{"name":"importStmt","comment":" Creates an Elm import statement; the name of the module, an optional alias\nname for the module, and an optional list of exposings from the module.\n","type":"Elm.CodeGen.ModuleName -> Maybe.Maybe Elm.CodeGen.ModuleName -> Maybe.Maybe Elm.CodeGen.Exposing -> Elm.CodeGen.Import"},{"name":"int","comment":" Integer Int\n","type":"Basics.Int -> Elm.CodeGen.Expression"},{"name":"intAnn","comment":" An `Int` type annotation.\n","type":"Elm.CodeGen.TypeAnnotation"},{"name":"intPattern","comment":" IntPattern Int\n","type":"Basics.Int -> Elm.CodeGen.Pattern"},{"name":"lambda","comment":" LambdaExpression Lambda\n","type":"List.List Elm.CodeGen.Pattern -> Elm.CodeGen.Expression -> Elm.CodeGen.Expression"},{"name":"letExpr","comment":" LetExpression LetBlock\n","type":"List.List Elm.Syntax.Expression.LetDeclaration -> Elm.CodeGen.Expression -> Elm.CodeGen.Expression"},{"name":"list","comment":" ListExpr (List (Node Expression))\n","type":"List.List Elm.CodeGen.Expression -> Elm.CodeGen.Expression"},{"name":"listAnn","comment":" Creates a `List` type annotation.\n","type":"Elm.CodeGen.TypeAnnotation -> Elm.CodeGen.TypeAnnotation"},{"name":"listPattern","comment":" ListPattern (List (Node Pattern))\n","type":"List.List Elm.CodeGen.Pattern -> Elm.CodeGen.Pattern"},{"name":"maybeAnn","comment":" Creates a `Maybe` type annotation.\n","type":"Elm.CodeGen.TypeAnnotation -> Elm.CodeGen.TypeAnnotation"},{"name":"namedPattern","comment":" NamedPattern QualifiedNameRef (List (Node Pattern))\n","type":"String.String -> List.List Elm.CodeGen.Pattern -> Elm.CodeGen.Pattern"},{"name":"negate","comment":" Negation (Node Expression)\n","type":"Elm.CodeGen.Expression -> Elm.CodeGen.Expression"},{"name":"normalModule","comment":" NormalModule DefaultModuleData\n","type":"Elm.CodeGen.ModuleName -> List.List Elm.CodeGen.TopLevelExpose -> Elm.CodeGen.Module"},{"name":"op","comment":" Operator String\n","type":"String.String -> Elm.CodeGen.Expression"},{"name":"opApply","comment":" OperatorApplication String InfixDirection (Node Expression) (Node Expression)\n","type":"String.String -> Elm.Syntax.Infix.InfixDirection -> Elm.CodeGen.Expression -> Elm.CodeGen.Expression -> Elm.CodeGen.Expression"},{"name":"openTypeExpose","comment":" TypeExpose ExposedType\n","type":"String.String -> Elm.CodeGen.TopLevelExpose"},{"name":"parens","comment":" ParenthesizedExpression (Node Expression)\n","type":"Elm.CodeGen.Expression -> Elm.CodeGen.Expression"},{"name":"parensPattern","comment":" ParenthesizedPattern (Node Pattern)\n","type":"Elm.CodeGen.Pattern -> Elm.CodeGen.Pattern"},{"name":"patternDecl","comment":" Destructuring (Node Pattern) (Node Expression)\n","type":"Elm.CodeGen.Pattern -> Elm.CodeGen.Expression -> Elm.CodeGen.Declaration"},{"name":"pipe","comment":" Joins multiple expressions together with the pipe operator `|>`. An\nexpression `a` combined with a list of expressions `[b, c, d]` results in:\n\n    a |> b |> c |> d\n\n","type":"Elm.CodeGen.Expression -> List.List Elm.CodeGen.Expression -> Elm.CodeGen.Expression"},{"name":"portDecl","comment":" PortDeclaration Signature\n","type":"String.String -> Elm.CodeGen.TypeAnnotation -> Elm.CodeGen.Declaration"},{"name":"portModule","comment":" PortModule DefaultModuleData\n","type":"Elm.CodeGen.ModuleName -> List.List Elm.CodeGen.TopLevelExpose -> Elm.CodeGen.Module"},{"name":"prefixOp","comment":" PrefixOperator String\n","type":"String.String -> Elm.CodeGen.Expression"},{"name":"record","comment":" RecordExpr (List (Node RecordSetter))\n","type":"List.List ( String.String, Elm.CodeGen.Expression ) -> Elm.CodeGen.Expression"},{"name":"recordAnn","comment":" Record RecordDefinition\n","type":"List.List ( String.String, Elm.CodeGen.TypeAnnotation ) -> Elm.CodeGen.TypeAnnotation"},{"name":"recordPattern","comment":" RecordPattern (List (Node String))\n","type":"List.List String.String -> Elm.CodeGen.Pattern"},{"name":"setAnn","comment":" Creates a `Set` type annotation.\n","type":"Elm.CodeGen.TypeAnnotation -> Elm.CodeGen.TypeAnnotation"},{"name":"signature","comment":" Creates a type signature.\n","type":"String.String -> Elm.CodeGen.TypeAnnotation -> Elm.Syntax.Signature.Signature"},{"name":"string","comment":" Literal String\n","type":"String.String -> Elm.CodeGen.Expression"},{"name":"stringAnn","comment":" A `String` type annotation.\n","type":"Elm.CodeGen.TypeAnnotation"},{"name":"stringPattern","comment":" StringPattern String\n","type":"String.String -> Elm.CodeGen.Pattern"},{"name":"tuple","comment":" TupledExpression (List (Node Expression))\n","type":"List.List Elm.CodeGen.Expression -> Elm.CodeGen.Expression"},{"name":"tupleAnn","comment":" Tupled (List (Node TypeAnnotation))\n","type":"List.List Elm.CodeGen.TypeAnnotation -> Elm.CodeGen.TypeAnnotation"},{"name":"tuplePattern","comment":" TuplePattern (List (Node Pattern))\n","type":"List.List Elm.CodeGen.Pattern -> Elm.CodeGen.Pattern"},{"name":"typeOrAliasExpose","comment":" TypeOrAliasExpose String\n","type":"String.String -> Elm.CodeGen.TopLevelExpose"},{"name":"typeVar","comment":" GenericType String\n","type":"String.String -> Elm.CodeGen.TypeAnnotation"},{"name":"typed","comment":" Typed (Node ( ModuleName, String )) (List (Node TypeAnnotation))\n","type":"String.String -> List.List Elm.CodeGen.TypeAnnotation -> Elm.CodeGen.TypeAnnotation"},{"name":"unConsPattern","comment":" UnConsPattern (Node Pattern) (Node Pattern)\n","type":"Elm.CodeGen.Pattern -> Elm.CodeGen.Pattern -> Elm.CodeGen.Pattern"},{"name":"unit","comment":" UnitExpr\n","type":"Elm.CodeGen.Expression"},{"name":"unitAnn","comment":" Unit\n","type":"Elm.CodeGen.TypeAnnotation"},{"name":"unitPattern","comment":" UnitPattern\n","type":"Elm.CodeGen.Pattern"},{"name":"update","comment":" RecordUpdateExpression (Node String) (List (Node RecordSetter))\n","type":"String.String -> List.List ( String.String, Elm.CodeGen.Expression ) -> Elm.CodeGen.Expression"},{"name":"val","comment":" Creates a FunctionOrValue with no qualifiying module.\n\nNote this is the same as `fun`.\n\n","type":"String.String -> Elm.CodeGen.Expression"},{"name":"varPattern","comment":" VarPattern String\n","type":"String.String -> Elm.CodeGen.Pattern"}],"binops":[]},{"name":"Elm.Pretty","comment":" Elm.Pretty is a pretty printer for Elm syntax trees. It makes use of\n`the-sett/elm-pretty-printer` to best fit the code to a given character width.\n\nIt aims to output code that is fully stable with respect to `elm-format` in the\nsense that running `elm-format` on the output should have no effect at all. The\nadvantage of this is that if generated code moves to being edited by hand, there\nwill not be a large white-space only diff created when `elm-format` is applied.\n\nTo print the `Doc` created by the `pretty` functions, `the-sett/elm-pretty-printer`\nis used:\n\n    import Elm.Pretty\n    import Pretty\n\n    elmAsString =\n        Elm.Pretty.pretty someFile\n            |> Pretty.pretty 120\n\n    -- Fit to a page width of 120 characters\n\n\n# Pretty prints an entire Elm file.\n\n@docs pretty\n\n\n# Pretty printing snippets of Elm.\n\n@docs prettyImports, prettyExposing\n@docs prettyDeclaration, prettyFun, prettyTypeAlias, prettyCustomType, prettyPortDeclaration, prettyDestructuring\n@docs prettySignature, prettyPattern, prettyExpression, prettyTypeAnnotation\n\n","unions":[],"aliases":[],"values":[{"name":"pretty","comment":" Pretty prints a file of Elm code.\n","type":"Elm.Syntax.File.File -> Pretty.Doc"},{"name":"prettyCustomType","comment":" Pretty prints a custom type declaration, which may include documentation too.\n","type":"Elm.Syntax.Type.Type -> Pretty.Doc"},{"name":"prettyDeclaration","comment":" Pretty prints a single top-level declaration.\n","type":"Elm.Syntax.Declaration.Declaration -> Pretty.Doc"},{"name":"prettyDestructuring","comment":" Pretty prints a desctructuring declaration.\n","type":"Elm.Syntax.Pattern.Pattern -> Elm.Syntax.Expression.Expression -> Pretty.Doc"},{"name":"prettyExposing","comment":" Pretty prints the contents of an exposing statement, as found on a module or import\nstatement.\n\nThe exposed values will be de-duplicated and sorted.\n\n","type":"Elm.Syntax.Exposing.Exposing -> Pretty.Doc"},{"name":"prettyExpression","comment":" Pretty prints an expression.\n","type":"Elm.Syntax.Expression.Expression -> Pretty.Doc"},{"name":"prettyFun","comment":" Pretty prints an Elm function, which may include documentation and a signature too.\n","type":"Elm.Syntax.Expression.Function -> Pretty.Doc"},{"name":"prettyImports","comment":" Pretty prints a list of import statements.\n\nThe list will be de-duplicated and sorted.\n\n","type":"List.List Elm.Syntax.Import.Import -> Pretty.Doc"},{"name":"prettyPattern","comment":" Pretty prints a pattern.\n","type":"Elm.Syntax.Pattern.Pattern -> Pretty.Doc"},{"name":"prettyPortDeclaration","comment":" Pretty prints a port declaration.\n","type":"Elm.Syntax.Signature.Signature -> Pretty.Doc"},{"name":"prettySignature","comment":" Pretty prints a type signature.\n","type":"Elm.Syntax.Signature.Signature -> Pretty.Doc"},{"name":"prettyTypeAlias","comment":" Pretty prints a type alias definition, which may include documentation too.\n","type":"Elm.Syntax.TypeAlias.TypeAlias -> Pretty.Doc"},{"name":"prettyTypeAnnotation","comment":" Pretty prints a type annotation.\n","type":"Elm.Syntax.TypeAnnotation.TypeAnnotation -> Pretty.Doc"}],"binops":[]}]