showTree :: (Show k, Show a) => Map k a -> String
O(n \log n). Show the tree that implements the map. The tree is shown
in a compressed, hanging format. See showTreeWith.
showTree :: (Show k, Show a) => Map k a -> StringO(n \log n). Show the tree that implements the map. The tree is shown
in a compressed, hanging format. See showTreeWith.
showTreeWith :: (k -> a -> String) -> Bool -> Bool -> Map k a -> StringO(n \log n). The expression () shows
the tree that implements the map. Elements are shown using the showTreeWith showelem hang wide mapshowElem function. If hang is
True, a hanging tree is shown otherwise a rotated tree is shown. If
wide is True, an extra wide version is shown.
Map> let t = fromDistinctAscList [(x,()) | x <- [1..5]]
Map> putStrLn $ showTreeWith (\k x -> show (k,x)) True False t
(4,())
+--(2,())
| +--(1,())
| +--(3,())
+--(5,())
Map> putStrLn $ showTreeWith (\k x -> show (k,x)) True True t
(4,())
|
+--(2,())
| |
| +--(1,())
| |
| +--(3,())
|
+--(5,())
Map> putStrLn $ showTreeWith (\k x -> show (k,x)) False True t
+--(5,())
|
(4,())
|
| +--(3,())
| |
+--(2,())
|
+--(1,())showsTree :: (k -> a -> String) -> Bool -> [String] -> [String] -> Map k a -> ShowSshowsTreeHang :: (k -> a -> String) -> Bool -> [String] -> Map k a -> ShowSshowWide :: Bool -> [String] -> String -> StringshowsBars :: [String] -> ShowSnode :: StringwithBar :: [String] -> [String]withEmpty :: [String] -> [String]valid :: Ord k => Map k a -> BoolO(n). Test if the internal map structure is valid.
valid (fromAscList [(3,"b"), (5,"a")]) == True
valid (fromAscList [(5,"a"), (3,"b")]) == Falseordered :: Ord a => Map a b -> BoolTest if the keys are ordered correctly.
balanced :: Map k a -> BoolTest if a map obeys the balance invariants.
validsize :: Map a b -> BoolTest if each node of a map reports its size correctly.
Community contribution. The service has not verified this documentation. The generator reported 15 diagnostics.
Target: Linux on x86-64. Some inferred types and resolved links are not available.
Generator: aihc-haddock-aa6debbd-web-3
Metadata snapshot: 634f718c0d8cd970c4e2c511d2345d8fd36c6dc32b06343c2b4e914ffccbce7f
Open the dependency plan · Download the documentation model