[{"name":"Tree.Blocks","comment":" This module provides tools for converting text into a list of blocks, where\n\n        type alias Block =\n            { indent : Int\n            , content : String\n            }\n\nLists of blocks are used by the functions in Tree.Build to construct trees\nform text. Here are some examples:\n\n        > fromStringAsLines \"one\\n  two\\n    three\"\n          [   { content = \"one\", indent = 0 }\n            , { content = \"two\", indent = 2 }\n            , { content = \"three\", indent = 4 }\n          ]\n\n        > fromStringAsParagraphs \"one\\nho ho ho!\\n  two\\n  ha ha ha!\"\n          [   { content = \"one\\nho ho ho!\", indent = 0 }\n            , { content = \"two\\nha ha ha!\", indent = 2 }\n          ]\n\n@docs Block, fromStringAsLines, fromStringAsParagraphs, make, quantumOfBlocks, wellFormed\n\n","unions":[],"aliases":[{"name":"Block","comment":" ","args":[],"type":"{ indent : Basics.Int, content : String.String }"}],"values":[{"name":"fromStringAsLines","comment":" ","type":"String.String -> List.List Tree.Blocks.Block"},{"name":"fromStringAsParagraphs","comment":" ","type":"String.String -> List.List Tree.Blocks.Block"},{"name":"make","comment":" ","type":"List.List String.String -> List.List Tree.Blocks.Block"},{"name":"quantumOfBlocks","comment":" Determine the \"quantum of indentation.\" In a well-formed\nlist of blocks, when the indentation level increases, it increases\nby one quantum. When it decreases, it decreases by one or\nmore quanta.\n\n    > \"1\\n 2\\n  3\\n    4\" |> fromString |> quantumOfBlocks\n      1\n\n    > \"1\\n  2\\n    3\\n      4\" |> fromString |> quantumOfBlocks\n       2\n\n    > \"1\\n  2\\n   3\" |> fromString |> quantumOfBlocks\n\n","type":"List.List Tree.Blocks.Block -> Basics.Int"},{"name":"wellFormed","comment":" Determine if a list of blocks is well-formed, meaning that when\nthe indentation level increases, it increases by one quantum\nand no more. The return value is a pair consisting of the\nquantum of indentation and True or False, depending on\nwhethe the list is well-formed.\n\n    > \"1\\n 2\\n 3\\n  4\\n 5\" |> fromString |> wellFormed\n      (1, True)\n\n    > \"1\\n  2\\n    3\\n     4\\n 5\" |> fromString |> wellFormed\n       (1, False)\n\n    > \"1\\n  2\\n  3\\n    4\\n5\" |> fromString |> wellFormed\n      (2, True)\n\n","type":"List.List Tree.Blocks.Block -> ( Basics.Int, Basics.Bool )"}],"binops":[]},{"name":"Tree.Build","comment":" Tools for building\na tree from a string or a list of blocks. A tree\nis represented in text as an outline:\n\n    Example:\n\n        > data = \"1\\n 2\\n 3\\n 4\\n5\\n 6\\n 7\"\n\n        > fromString \"?\" identity data\n          Tree \"0\" [\n                Tree \"1\" [Tree \"2\" [],Tree \"3\" [], Tree \"4\" []]\n              , Tree \"5\" [Tree \"6\" [],Tree \"7\" []]\n              ]\n\nThe first argument of fromString is a label for a default node.\nThe second argument, of type (String -> node), tells how to build a node from a string\nrepresentation of that node. Here we use the representation of rose trees of\n[elm/rose-tree](https://package.elm-lang.org/packages/zwilias/elm-rosetree/latest/).\n\n@docs fromString, fromBlocks, forestFromString, forestFromBlocks, Error\n\n","unions":[{"name":"Error","comment":" ","args":[],"cases":[["EmptyBlocks",[]],["BlocksNotWellFormed",[]]]}],"aliases":[],"values":[{"name":"forestFromBlocks","comment":" ","type":"a -> (String.String -> a) -> (a -> String.String) -> List.List Tree.Blocks.Block -> Result.Result Tree.Build.Error (List.List (Tree.Tree a))"},{"name":"forestFromString","comment":" Example:\n\n    > forestFromString \"?\" identity identity \"1\\n 2\\n 3\"\n      Ok [Tree \"1\" [Tree \"2\" [],Tree \"3\" []]]\n\n    > forestFromString \"?\" identity identity \"1\\n 2\\n 3\\n4\\n 5\\n 6\"\n    Ok [Tree \"1\" [Tree \"2\" [],Tree \"3\" []],Tree \"4\" [Tree \"5\" [],Tree \"6\" []]]\n\n","type":"a -> (String.String -> a) -> (a -> String.String) -> String.String -> Result.Result Tree.Build.Error (List.List (Tree.Tree a))"},{"name":"fromBlocks","comment":" ","type":"node -> (String.String -> node) -> List.List Tree.Blocks.Block -> Result.Result Tree.Build.Error (Tree.Tree node)"},{"name":"fromString","comment":" ","type":"node -> (String.String -> node) -> String.String -> Result.Result Tree.Build.Error (Tree.Tree node)"}],"binops":[]},{"name":"Tree.Lib","comment":" Utility functions. preOrder and levelOrder transform\nTree a to List a, where the nodes are listed in the\ngiven order. Given Tree a, the edges function returns\nList (a,a), where a pair (p,q) is in the returned list\nif and only if q is a child of p.\n\n@docs preOrder, levelOrder, edges\n\n","unions":[],"aliases":[],"values":[{"name":"edges","comment":"\n\n    Return a list of pairs (x,y) where\n\n        - x and y are of type a\n        - (x,y) is in the list if and only if y is a chiild of x.\n\n","type":"Tree.Tree a -> List.List ( a, a )"},{"name":"levelOrder","comment":" ","type":"Tree.Tree a -> List.List a"},{"name":"preOrder","comment":" ","type":"Tree.Tree a -> List.List a"}],"binops":[]},{"name":"Tree.Random","comment":" Utilities for generating and collecting statistics on random trees.\n\n@docs generate, generateOutline, depths\n\n","unions":[],"aliases":[],"values":[{"name":"depths","comment":"\n\n    depths k n seed:  generate n random trees of k nodes using the given seed\n    and collect statistics on their depths\n\n    > depths 10 10 0\n    [(2,1),(3,2),(4,3),(5,2),(8,2)] -- one tree of depth two, two trees of depth three, etc.\n\n    > depths 10 10 1\n    [(2,1),(3,1),(4,3),(5,2),(7,1),(8,2)]\n\n    > depths 10 10 2\n    [(2,1),(3,2),(4,3),(5,2),(7,1),(8,1)]\n\n","type":"Basics.Int -> Basics.Int -> Basics.Int -> List.List ( Basics.Int, Basics.Int )"},{"name":"generate","comment":" Generate a random rose tree with the given number nodes\nand with given seed.\n","type":"Basics.Int -> Basics.Int -> Result.Result Tree.Build.Error (Tree.Tree String.String)"},{"name":"generateOutline","comment":" Generate a random outline.\n","type":"Basics.Int -> Basics.Int -> String.String"}],"binops":[]},{"name":"Tree.Render","comment":" Functions for transforming a tree or a forest to a string.\n\n@docs toString, forestToString\n\n","unions":[],"aliases":[],"values":[{"name":"forestToString","comment":" The first argument is the quantum of indentation. The second\nis a function for transforming a node of a forest to a string.\n","type":"Basics.Int -> (a -> String.String) -> List.List (Tree.Tree a) -> String.String"},{"name":"toString","comment":" The first argument is the quantum of indentation. The second\nis a function for transforming a node of a tree to a string.\n","type":"Basics.Int -> (a -> String.String) -> Tree.Tree a -> String.String"}],"binops":[]},{"name":"Tree.Svg","comment":" Helper functions for rendering trees:\n\n    import Tree.Build\n    import Tree.Transform\n\n    tree =\n        Tree.Build.fromString \"?\" identity \"1\\n 2\\n 3\\n 4\\n\"\n\n    graph =\n        Result.map (Tree.Transform.toGraph preferences identity) tree |> Result.withDefault []\n\n\n    Tree.Svg.render (Tree.Svg.transform 280 100 60 60 0.5 graph)\n\n@docs render, transform\n\n","unions":[],"aliases":[],"values":[{"name":"render","comment":" Render a graph to SVG\n","type":"Tree.Graph.Graph -> List.List (Svg.Svg msg)"},{"name":"transform","comment":" Tranform the charactericxrwe\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Tree.Graph.Graph -> Tree.Graph.Graph"}],"binops":[]},{"name":"Tree.Transform","comment":"\n\n@docs Preferences, defaults, toGraph\n\n","unions":[],"aliases":[{"name":"Preferences","comment":" Preferences for function toGraph.\n","args":[],"type":"{ halfAngle : Basics.Float, initialEdgeLength : Basics.Float, scaleFactor : Basics.Float, ballRadius : Basics.Float, ballColor : String.String }"}],"values":[{"name":"defaults","comment":" Default Preferences\n","type":"{ halfAngle : Basics.Float, initialEdgeLength : number, scaleFactor : Basics.Float, ballRadius : number, ballColor : String.String }"},{"name":"toGraph","comment":" Transform a Tree to a Graph: a data structure that can be rendered to SVG.\n","type":"Tree.Transform.Preferences -> (a -> String.String) -> Tree.Tree a -> Tree.Graph.Graph"}],"binops":[]}]