ccapndave/elm-typed-tree/1.0.0

TreePath.Tree8

This module provides types and functions for managing a strongly typed tree of depth 8. 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 g leaf =
Tree8 a b c d e f g leaf
type TreePath1 a b c d e f g leaf
type TreePath2 a b c d e f g leaf
type TreePath3 a b c d e f g leaf
type TreePath4 a b c d e f g leaf
type TreePath5 a b c d e f g leaf
type TreePath6 a b c d e f g leaf
type TreePath7 a b c d e f g leaf
type TreePath8 a b c d e f g leaf

Encoders and decoders

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

Path constructor

toRootPath : Tree8 a b c d e f g leaf -> TreePath8 a b c d e f g leaf

Data

data1 : TreePath1 a b c d e f g leaf -> leaf
data2 : TreePath2 a b c d e f g leaf -> Data g leaf
data3 : TreePath3 a b c d e f g leaf -> Data f leaf
data4 : TreePath4 a b c d e f g leaf -> Data e leaf
data5 : TreePath5 a b c d e f g leaf -> Data d leaf
data6 : TreePath6 a b c d e f g leaf -> Data c leaf
data7 : TreePath7 a b c d e f g leaf -> Data b leaf
data8 : TreePath8 a b c d e f g leaf -> Data a leaf

Navigation

top1 : TreePath1 a b c d e f g leaf -> TreePath8 a b c d e f g leaf
up1 :
TreePath1 a b c d e f g leaf
-> Maybe (TreePath2 a b c d e f g leaf)
Int
-> TreePath1 a b c d e f g leaf
-> Maybe (TreePath1 a b c d e f g leaf)
down1 : Int -> TreePath1 a b c d e f g leaf -> Maybe Never
downs1 : TreePath1 a b c d e f g leaf -> List Never
top2 : TreePath2 a b c d e f g leaf -> TreePath8 a b c d e f g leaf
up2 :
TreePath2 a b c d e f g leaf
-> Maybe (TreePath3 a b c d e f g leaf)
Int
-> TreePath2 a b c d e f g leaf
-> Maybe (TreePath2 a b c d e f g leaf)
Int
-> TreePath2 a b c d e f g leaf
-> Maybe (TreePath1 a b c d e f g leaf)
TreePath2 a b c d e f g leaf
-> List (TreePath1 a b c d e f g leaf)
top3 : TreePath3 a b c d e f g leaf -> TreePath8 a b c d e f g leaf
up3 :
TreePath3 a b c d e f g leaf
-> Maybe (TreePath4 a b c d e f g leaf)
Int
-> TreePath3 a b c d e f g leaf
-> Maybe (TreePath3 a b c d e f g leaf)
Int
-> TreePath3 a b c d e f g leaf
-> Maybe (TreePath2 a b c d e f g leaf)
TreePath3 a b c d e f g leaf
-> List (TreePath2 a b c d e f g leaf)
top4 : TreePath4 a b c d e f g leaf -> TreePath8 a b c d e f g leaf
up4 :
TreePath4 a b c d e f g leaf
-> Maybe (TreePath5 a b c d e f g leaf)
Int
-> TreePath4 a b c d e f g leaf
-> Maybe (TreePath4 a b c d e f g leaf)
Int
-> TreePath4 a b c d e f g leaf
-> Maybe (TreePath3 a b c d e f g leaf)
TreePath4 a b c d e f g leaf
-> List (TreePath3 a b c d e f g leaf)
top5 : TreePath5 a b c d e f g leaf -> TreePath8 a b c d e f g leaf
up5 :
TreePath5 a b c d e f g leaf
-> Maybe (TreePath6 a b c d e f g leaf)
Int
-> TreePath5 a b c d e f g leaf
-> Maybe (TreePath5 a b c d e f g leaf)
Int
-> TreePath5 a b c d e f g leaf
-> Maybe (TreePath4 a b c d e f g leaf)
TreePath5 a b c d e f g leaf
-> List (TreePath4 a b c d e f g leaf)
top6 : TreePath6 a b c d e f g leaf -> TreePath8 a b c d e f g leaf
up6 :
TreePath6 a b c d e f g leaf
-> Maybe (TreePath7 a b c d e f g leaf)
Int
-> TreePath6 a b c d e f g leaf
-> Maybe (TreePath6 a b c d e f g leaf)
Int
-> TreePath6 a b c d e f g leaf
-> Maybe (TreePath5 a b c d e f g leaf)
TreePath6 a b c d e f g leaf
-> List (TreePath5 a b c d e f g leaf)
top7 : TreePath7 a b c d e f g leaf -> TreePath8 a b c d e f g leaf
up7 :
TreePath7 a b c d e f g leaf
-> Maybe (TreePath8 a b c d e f g leaf)
Int
-> TreePath7 a b c d e f g leaf
-> Maybe (TreePath7 a b c d e f g leaf)
Int
-> TreePath7 a b c d e f g leaf
-> Maybe (TreePath6 a b c d e f g leaf)
TreePath7 a b c d e f g leaf
-> List (TreePath6 a b c d e f g leaf)
top8 : TreePath8 a b c d e f g leaf -> TreePath8 a b c d e f g leaf
up8 : TreePath8 a b c d e f g leaf -> Maybe Never
Int
-> TreePath8 a b c d e f g leaf
-> Maybe (TreePath8 a b c d e f g leaf)
Int
-> TreePath8 a b c d e f g leaf
-> Maybe (TreePath7 a b c d e f g leaf)
TreePath8 a b c d e f g leaf
-> List (TreePath7 a b c d e f g leaf)