ccapndave/elm-typed-tree/1.0.0

TreePath.Tree10

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

Encoders and decoders

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

Path constructor

Tree10 a b c d e f g h i leaf
-> TreePath10 a b c d e f g h i leaf

Data

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

Navigation

TreePath1 a b c d e f g h i leaf
-> TreePath10 a b c d e f g h i leaf
up1 :
TreePath1 a b c d e f g h i leaf
-> Maybe (TreePath2 a b c d e f g h i leaf)
Int
-> TreePath1 a b c d e f g h i leaf
-> Maybe (TreePath1 a b c d e f g h i leaf)
down1 : Int -> TreePath1 a b c d e f g h i leaf -> Maybe Never
downs1 : TreePath1 a b c d e f g h i leaf -> List Never
TreePath2 a b c d e f g h i leaf
-> TreePath10 a b c d e f g h i leaf
up2 :
TreePath2 a b c d e f g h i leaf
-> Maybe (TreePath3 a b c d e f g h i leaf)
Int
-> TreePath2 a b c d e f g h i leaf
-> Maybe (TreePath2 a b c d e f g h i leaf)
Int
-> TreePath2 a b c d e f g h i leaf
-> Maybe (TreePath1 a b c d e f g h i leaf)
TreePath2 a b c d e f g h i leaf
-> List (TreePath1 a b c d e f g h i leaf)
TreePath3 a b c d e f g h i leaf
-> TreePath10 a b c d e f g h i leaf
up3 :
TreePath3 a b c d e f g h i leaf
-> Maybe (TreePath4 a b c d e f g h i leaf)
Int
-> TreePath3 a b c d e f g h i leaf
-> Maybe (TreePath3 a b c d e f g h i leaf)
Int
-> TreePath3 a b c d e f g h i leaf
-> Maybe (TreePath2 a b c d e f g h i leaf)
TreePath3 a b c d e f g h i leaf
-> List (TreePath2 a b c d e f g h i leaf)
TreePath4 a b c d e f g h i leaf
-> TreePath10 a b c d e f g h i leaf
up4 :
TreePath4 a b c d e f g h i leaf
-> Maybe (TreePath5 a b c d e f g h i leaf)
Int
-> TreePath4 a b c d e f g h i leaf
-> Maybe (TreePath4 a b c d e f g h i leaf)
Int
-> TreePath4 a b c d e f g h i leaf
-> Maybe (TreePath3 a b c d e f g h i leaf)
TreePath4 a b c d e f g h i leaf
-> List (TreePath3 a b c d e f g h i leaf)
TreePath5 a b c d e f g h i leaf
-> TreePath10 a b c d e f g h i leaf
up5 :
TreePath5 a b c d e f g h i leaf
-> Maybe (TreePath6 a b c d e f g h i leaf)
Int
-> TreePath5 a b c d e f g h i leaf
-> Maybe (TreePath5 a b c d e f g h i leaf)
Int
-> TreePath5 a b c d e f g h i leaf
-> Maybe (TreePath4 a b c d e f g h i leaf)
TreePath5 a b c d e f g h i leaf
-> List (TreePath4 a b c d e f g h i leaf)
TreePath6 a b c d e f g h i leaf
-> TreePath10 a b c d e f g h i leaf
up6 :
TreePath6 a b c d e f g h i leaf
-> Maybe (TreePath7 a b c d e f g h i leaf)
Int
-> TreePath6 a b c d e f g h i leaf
-> Maybe (TreePath6 a b c d e f g h i leaf)
Int
-> TreePath6 a b c d e f g h i leaf
-> Maybe (TreePath5 a b c d e f g h i leaf)
TreePath6 a b c d e f g h i leaf
-> List (TreePath5 a b c d e f g h i leaf)
TreePath7 a b c d e f g h i leaf
-> TreePath10 a b c d e f g h i leaf
up7 :
TreePath7 a b c d e f g h i leaf
-> Maybe (TreePath8 a b c d e f g h i leaf)
Int
-> TreePath7 a b c d e f g h i leaf
-> Maybe (TreePath7 a b c d e f g h i leaf)
Int
-> TreePath7 a b c d e f g h i leaf
-> Maybe (TreePath6 a b c d e f g h i leaf)
TreePath7 a b c d e f g h i leaf
-> List (TreePath6 a b c d e f g h i leaf)
TreePath8 a b c d e f g h i leaf
-> TreePath10 a b c d e f g h i leaf
up8 :
TreePath8 a b c d e f g h i leaf
-> Maybe (TreePath9 a b c d e f g h i leaf)
Int
-> TreePath8 a b c d e f g h i leaf
-> Maybe (TreePath8 a b c d e f g h i leaf)
Int
-> TreePath8 a b c d e f g h i leaf
-> Maybe (TreePath7 a b c d e f g h i leaf)
TreePath8 a b c d e f g h i leaf
-> List (TreePath7 a b c d e f g h i leaf)
TreePath9 a b c d e f g h i leaf
-> TreePath10 a b c d e f g h i leaf
up9 :
TreePath9 a b c d e f g h i leaf
-> Maybe (TreePath10 a b c d e f g h i leaf)
Int
-> TreePath9 a b c d e f g h i leaf
-> Maybe (TreePath9 a b c d e f g h i leaf)
Int
-> TreePath9 a b c d e f g h i leaf
-> Maybe (TreePath8 a b c d e f g h i leaf)
TreePath9 a b c d e f g h i leaf
-> List (TreePath8 a b c d e f g h i leaf)
TreePath10 a b c d e f g h i leaf
-> TreePath10 a b c d e f g h i leaf
up10 : TreePath10 a b c d e f g h i leaf -> Maybe Never
Int
-> TreePath10 a b c d e f g h i leaf
-> Maybe (TreePath10 a b c d e f g h i leaf)
Int
-> TreePath10 a b c d e f g h i leaf
-> Maybe (TreePath9 a b c d e f g h i leaf)
TreePath10 a b c d e f g h i leaf
-> List (TreePath9 a b c d e f g h i leaf)