HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulehxt-9.3.1.22Haskell2010

Data.Tree.NavigatableTree.Class

Interface definition for navigatable trees. Navigatable trees need to have operations to move up, down, left and right. With these elementary operations, most of the XPath axises can be defined.

  • 3 classes
  • Packagehxt-9.3.1.22
  • Exports3
  • LanguageHaskell2010
  • LicenceMIT
  • SourceClass.hs
classclass NavigatableTreeToTree (nt :: Type -> Type) (t :: Type -> Type) | t -> nt, nt -> t where
#

Conversion between trees and navigatable trees,

There is only a single navigatable tree implementation for a given tree allowed (see the functional dependencies)

Methods

  • fromTree :: t a -> nt a

    construct a navigatable tree

  • toTree :: nt a -> t a

    remove navigation

Instances1NavigatableTreeToTree
classclass NavigatableTreeModify (nt :: Type -> Type) (t :: Type -> Type) | t -> nt, nt -> t where
#

Edit operation on navigatable trees

There is only a single navigatable tree implementation for a given tree allowed (see the functional dependencies)

Methods

  • addTreeLeft :: t a -> nt a -> Maybe (nt a)

    add an ordinary tree in front of the given navigatable tree

  • addTreeRight :: t a -> nt a -> Maybe (nt a)

    add an ordinary tree behind of the given navigatable tree

  • dropTreeLeft :: nt a -> Maybe (nt a)

    drop the direct left sibling tree of the given navigatable tree

  • dropTreeRight :: nt a -> Maybe (nt a)

    drop the direct right sibling tree of the given navigatable tree

  • substThisTree :: t a -> nt a -> nt a

    change the tree but remain the navigation

Instances1NavigatableTreeModify