| Safe Haskell | Safe-Infered |
|---|
DataTreeView.StrictTypes
Contents
Description
Remark: the heavy use of strictness here is for correctly catching exceptions, not for performance reasons
- module Data.Tree
- module Data.Monoid
- data StrictList a
- class ToStrictList x a where
- strictList :: x -> StrictList a
- fromStrictList :: StrictList a -> [a]
- data StrictTree a
- type StrictForest a = StrictList (StrictTree a)
- class ToStrictTree x a where
- strictTree :: x -> StrictTree a
- class ToStrictForest y a where
- strictForest :: y -> StrictForest a
- modifyValue :: StrictTree a -> (a -> a) -> StrictTree a
- modifyChildren :: StrictTree a -> (StrictForest a -> StrictForest a) -> StrictTree a
- nodeValue :: StrictTree a -> a
- nodeChildren :: StrictTree t -> [StrictTree t]
- fromStrictTree :: StrictTree a -> Tree a
- fromStrictForest :: StrictForest a -> Forest a
Documentation
module Data.Tree
module Data.Monoid
Strict lists
data StrictList a Source
Strict lists (in both the head and tail)
Note: Most operations for this type are provided via the ListLike instance, but ListLike is not reexported here.
Instances
| Functor StrictList | |
| Typeable1 StrictList | |
| Foldable StrictList | |
| Traversable StrictList | |
| Data a => Data (StrictList a) | |
| Show a => Show (StrictList a) | |
| Monoid (StrictList a) | Empty list and appending |
| ListLike (StrictList a) a | |
| FoldableLL (StrictList a) a | |
| ToStrictForest (StrictForest a) a | Identity |
| ToStrictTree x a => ToStrictForest (StrictList x) a | |
| ToStrictList (StrictList a) a | Identity |
Construction
class ToStrictList x a whereSource
Methods
strictList :: x -> StrictList aSource
Instances
| ToStrictList a a | Singleton |
| ToStrictList [a] a | From lazy list |
| ToStrictList (StrictList a) a | Identity |
| ToStrictList x a => ToStrictList (a, x) a | Cons |
Destruction
fromStrictList :: StrictList a -> [a]Source
Strict trees and forests
data StrictTree a Source
Instances
| Functor StrictTree | |
| Typeable1 StrictTree | |
| Foldable StrictTree | |
| Traversable StrictTree | |
| Data a => Data (StrictTree a) | |
| Show a => Show (StrictTree a) | |
| ToStrictForest (StrictForest a) a | Identity |
| ToStrictTree (StrictTree a) a | Identity |
type StrictForest a = StrictList (StrictTree a)Source
Construction
class ToStrictTree x a whereSource
Methods
strictTree :: x -> StrictTree aSource
Instances
| ToStrictTree a a | Leaf |
| ToStrictTree (Tree a) a | From lazy tree |
| ToStrictTree (StrictTree a) a | Identity |
| ToStrictForest y a => ToStrictTree (a, y) a | From node value and subforest |
class ToStrictForest y a whereSource
Methods
strictForest :: y -> StrictForest aSource
Instances
| ToStrictTree x a => ToStrictForest [x] a | |
| ToStrictForest (StrictForest a) a | Identity |
| ToStrictTree x a => ToStrictForest (StrictList x) a |
Modification
modifyValue :: StrictTree a -> (a -> a) -> StrictTree aSource
Note: this function is not recursive.
modifyChildren :: StrictTree a -> (StrictForest a -> StrictForest a) -> StrictTree aSource
Note: this function is not recursive.
Destruction
nodeValue :: StrictTree a -> aSource
nodeChildren :: StrictTree t -> [StrictTree t]Source
fromStrictTree :: StrictTree a -> Tree aSource
fromStrictForest :: StrictForest a -> Forest aSource