Modulecursor-0.3.2.0Haskell2010
Cursor.Simple.Forest
- 3 types
- 87 values
- Packagecursor-0.3.2.0
- Exports90
- LanguageHaskell2010
- LicenceMIT
- SourceForest.hs
Swaps the current node with the previous node on the same level
Example:
Before:
- a
- b <--After:
- b <--
- aSwaps the current node with the next node on the same level
Example:
Before:
- a <--
- bAfter:
- b
- a <--Demotes the current node to the level of its children, by adding two roots. One for the current node and one for its children that are left behind.
Example:
Before:
- a <--
|- bAfter:
- <given element 1>
|- a <--
- <given element 2>
|- bDemotes the current subtree to the level of its children, by adding a root.
Example:
Before:
a <--
|- bAfter:
<given element>
|- a <--
|- bInstances9Functor, Foldable, Traversable, Eq, Show, Generic, …
Functor CTreeDefined in cursor-0.3.2.0 · Cursor.Tree.TypesFoldable CTreeDefined in cursor-0.3.2.0 · Cursor.Tree.TypesTraversable CTreeDefined in cursor-0.3.2.0 · Cursor.Tree.TypesEq a => Eq (CTree a)Defined in cursor-0.3.2.0 · Cursor.Tree.TypesShow a => Show (CTree a)Defined in cursor-0.3.2.0 · Cursor.Tree.TypesGeneric (CTree a)Defined in cursor-0.3.2.0 · Cursor.Tree.TypesNFData a => NFData (CTree a)Defined in cursor-0.3.2.0 · Cursor.Tree.TypesValidity a => Validity (CTree a)Defined in cursor-0.3.2.0 · Cursor.Tree.Typestype Rep (CTree a) = D1 ('MetaDataDefined in cursor-0.3.2.0 · Cursor.Tree.Types"CTree"
"Cursor.Tree.Types"
"cursor-0.3.2.0-F9X8WOAtgDl2Ee7ztttX2k"
'False) (C1 ('MetaCons"CNode"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CForest a))))
Constructors
EmptyCForestClosedForest !(NonEmpty (Tree a))OpenForest !(NonEmpty (CTree a))
Instances9Functor, Foldable, Traversable, Eq, Show, Generic, …
Functor CForestDefined in cursor-0.3.2.0 · Cursor.Tree.TypesFoldable CForestDefined in cursor-0.3.2.0 · Cursor.Tree.TypesTraversable CForestDefined in cursor-0.3.2.0 · Cursor.Tree.TypesEq a => Eq (CForest a)Defined in cursor-0.3.2.0 · Cursor.Tree.TypesShow a => Show (CForest a)Defined in cursor-0.3.2.0 · Cursor.Tree.TypesGeneric (CForest a)Defined in cursor-0.3.2.0 · Cursor.Tree.TypesNFData a => NFData (CForest a)Defined in cursor-0.3.2.0 · Cursor.Tree.TypesValidity a => Validity (CForest a)Defined in cursor-0.3.2.0 · Cursor.Tree.Typestype Rep (CForest a) = D1 ('MetaDataDefined in cursor-0.3.2.0 · Cursor.Tree.Types"CForest"
"Cursor.Tree.Types"
"cursor-0.3.2.0-F9X8WOAtgDl2Ee7ztttX2k"
'False) (C1 ('MetaCons"EmptyCForest"
'PrefixI 'False) U1 :+: (C1 ('MetaCons"ClosedForest"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty (Tree a)))) :+: C1 ('MetaCons"OpenForest"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty (CTree a))))))