ccapndave / elm-typed-tree / TreePath.Tree7

This module provides types and functions for managing a strongly typed tree of depth 7. Each level of the tree can have its own type, and each level can contain Data either of that type, or the leaf type.

Definition


type alias Tree a b c d e f leaf =
Tree7 a b c d e f leaf


type TreePath1 a b c d e f leaf


type TreePath2 a b c d e f leaf


type TreePath3 a b c d e f leaf


type TreePath4 a b c d e f leaf


type TreePath5 a b c d e f leaf


type TreePath6 a b c d e f leaf


type TreePath7 a b c d e f leaf

Encoders and decoders


type alias DecoderConfig a b c d e f leaf path =
{ level7 : { decoder : Json.Decode.Decoder a
, encoders : a -> List ( String
, Json.Encode.Value )
, pathType : TreePath7 a b c d e f leaf -> path
, childrenField : String }
, level6 : { decoder : Json.Decode.Decoder b
, encoders : b -> List ( String
, Json.Encode.Value )
, pathType : TreePath6 a b c d e f leaf -> path
, childrenField : String }
, level5 : { decoder : Json.Decode.Decoder c
, encoders : c -> List ( String
, Json.Encode.Value )
, pathType : TreePath5 a b c d e f leaf -> path
, childrenField : String }
, level4 : { decoder : Json.Decode.Decoder d
, encoders : d -> List ( String
, Json.Encode.Value )
, pathType : TreePath4 a b c d e f leaf -> path
, childrenField : String }
, level3 : { decoder : Json.Decode.Decoder e
, encoders : e -> List ( String
, Json.Encode.Value )
, pathType : TreePath3 a b c d e f leaf -> path
, childrenField : String }
, level2 : { decoder : Json.Decode.Decoder f
, encoders : f -> List ( String
, Json.Encode.Value )
, pathType : TreePath2 a b c d e f leaf -> path
, childrenField : String }
, leaf : { decoder : Json.Decode.Decoder leaf
, encode : leaf -> Json.Encode.Value
, pathType : TreePath1 a b c d e f leaf -> path } 
}

decoder : DecoderConfig a b c d e f leaf path -> Json.Decode.Decoder (Tree7 a b c d e f leaf)

pathDecoder : DecoderConfig a b c d e f leaf path -> Json.Decode.Decoder path

pathEncode1 : DecoderConfig a b c d e f leaf path -> TreePath1 a b c d e f leaf -> Json.Encode.Value

pathEncode2 : DecoderConfig a b c d e f leaf path -> TreePath2 a b c d e f leaf -> Json.Encode.Value

pathEncode3 : DecoderConfig a b c d e f leaf path -> TreePath3 a b c d e f leaf -> Json.Encode.Value

pathEncode4 : DecoderConfig a b c d e f leaf path -> TreePath4 a b c d e f leaf -> Json.Encode.Value

pathEncode5 : DecoderConfig a b c d e f leaf path -> TreePath5 a b c d e f leaf -> Json.Encode.Value

pathEncode6 : DecoderConfig a b c d e f leaf path -> TreePath6 a b c d e f leaf -> Json.Encode.Value

pathEncode7 : DecoderConfig a b c d e f leaf path -> TreePath7 a b c d e f leaf -> Json.Encode.Value

Path constructor

toRootPath : Tree7 a b c d e f leaf -> TreePath7 a b c d e f leaf

Data

data1 : TreePath1 a b c d e f leaf -> leaf

data2 : TreePath2 a b c d e f leaf -> TreePath.Data.Data f leaf

data3 : TreePath3 a b c d e f leaf -> TreePath.Data.Data e leaf

data4 : TreePath4 a b c d e f leaf -> TreePath.Data.Data d leaf

data5 : TreePath5 a b c d e f leaf -> TreePath.Data.Data c leaf

data6 : TreePath6 a b c d e f leaf -> TreePath.Data.Data b leaf

data7 : TreePath7 a b c d e f leaf -> TreePath.Data.Data a leaf

Navigation

top1 : TreePath1 a b c d e f leaf -> TreePath7 a b c d e f leaf

up1 : TreePath1 a b c d e f leaf -> Maybe (TreePath2 a b c d e f leaf)

offset1 : Basics.Int -> TreePath1 a b c d e f leaf -> Maybe (TreePath1 a b c d e f leaf)

down1 : Basics.Int -> TreePath1 a b c d e f leaf -> Maybe Basics.Never

downs1 : TreePath1 a b c d e f leaf -> List Basics.Never

top2 : TreePath2 a b c d e f leaf -> TreePath7 a b c d e f leaf

up2 : TreePath2 a b c d e f leaf -> Maybe (TreePath3 a b c d e f leaf)

offset2 : Basics.Int -> TreePath2 a b c d e f leaf -> Maybe (TreePath2 a b c d e f leaf)

down2 : Basics.Int -> TreePath2 a b c d e f leaf -> Maybe (TreePath1 a b c d e f leaf)

downs2 : TreePath2 a b c d e f leaf -> List (TreePath1 a b c d e f leaf)

top3 : TreePath3 a b c d e f leaf -> TreePath7 a b c d e f leaf

up3 : TreePath3 a b c d e f leaf -> Maybe (TreePath4 a b c d e f leaf)

offset3 : Basics.Int -> TreePath3 a b c d e f leaf -> Maybe (TreePath3 a b c d e f leaf)

down3 : Basics.Int -> TreePath3 a b c d e f leaf -> Maybe (TreePath2 a b c d e f leaf)

downs3 : TreePath3 a b c d e f leaf -> List (TreePath2 a b c d e f leaf)

top4 : TreePath4 a b c d e f leaf -> TreePath7 a b c d e f leaf

up4 : TreePath4 a b c d e f leaf -> Maybe (TreePath5 a b c d e f leaf)

offset4 : Basics.Int -> TreePath4 a b c d e f leaf -> Maybe (TreePath4 a b c d e f leaf)

down4 : Basics.Int -> TreePath4 a b c d e f leaf -> Maybe (TreePath3 a b c d e f leaf)

downs4 : TreePath4 a b c d e f leaf -> List (TreePath3 a b c d e f leaf)

top5 : TreePath5 a b c d e f leaf -> TreePath7 a b c d e f leaf

up5 : TreePath5 a b c d e f leaf -> Maybe (TreePath6 a b c d e f leaf)

offset5 : Basics.Int -> TreePath5 a b c d e f leaf -> Maybe (TreePath5 a b c d e f leaf)

down5 : Basics.Int -> TreePath5 a b c d e f leaf -> Maybe (TreePath4 a b c d e f leaf)

downs5 : TreePath5 a b c d e f leaf -> List (TreePath4 a b c d e f leaf)

top6 : TreePath6 a b c d e f leaf -> TreePath7 a b c d e f leaf

up6 : TreePath6 a b c d e f leaf -> Maybe (TreePath7 a b c d e f leaf)

offset6 : Basics.Int -> TreePath6 a b c d e f leaf -> Maybe (TreePath6 a b c d e f leaf)

down6 : Basics.Int -> TreePath6 a b c d e f leaf -> Maybe (TreePath5 a b c d e f leaf)

downs6 : TreePath6 a b c d e f leaf -> List (TreePath5 a b c d e f leaf)

top7 : TreePath7 a b c d e f leaf -> TreePath7 a b c d e f leaf

up7 : TreePath7 a b c d e f leaf -> Maybe Basics.Never

offset7 : Basics.Int -> TreePath7 a b c d e f leaf -> Maybe (TreePath7 a b c d e f leaf)

down7 : Basics.Int -> TreePath7 a b c d e f leaf -> Maybe (TreePath6 a b c d e f leaf)

downs7 : TreePath7 a b c d e f leaf -> List (TreePath6 a b c d e f leaf)