HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulecursor-0.3.2.0Haskell2010

Cursor.Tree.Promote

  • 2 types
  • 2 values
  • Packagecursor-0.3.2.0
  • Exports4
  • LanguageHaskell2010
  • LicenceMIT
  • SourcePromote.hs
valuetreeCursorPromoteElem
  1. :: a -> b
  2. -> b -> a
  3. -> TreeCursor a b
  4. -> PromoteElemResult (TreeCursor a b)
#

Promotes the current node to the level of its parent.

Example:

Before:

 p
 |- a
 |  |- b
 |  |  |- c
 |  |- d <--
 |  |  |- e
 |  |- f
 |     |- g
 |- h

After:

 p
 |- a
 |  |- b
 |  |  |- c
 |  |  |- e
 |  |- f
 |     |- g
 |- d <--
 |- h
datadata PromoteElemResult a
#
Instances9Monad, Functor, Applicative, Eq, Show, Generic, …
valuetreeCursorPromoteSubTree
  1. :: a -> b
  2. -> b -> a
  3. -> TreeCursor a b
  4. -> PromoteResult (TreeCursor a b)
#

Promotes the current node to the level of its parent.

Example:

Before:

 p
 |- a
 |  |- b
 |  |  |- c
 |  |- d <--
 |  |  |- e
 |  |- f
 |     |- g
 |- h

After:

 p
 |- a
 |  |- b
 |  |  |- c
 |  |- f
 |     |- g
 |- d <--
 |  |- e
 |- h
datadata PromoteResult a
#
Instances9Monad, Functor, Applicative, Eq, Show, Generic, …