packages feed

cursor-dirforest-0.0.0.0 / src / Cursor / Simple / DirForest.hs

module Cursor.Simple.DirForest  ( -- * Types    DirForestCursor,    DFC.dirForestCursorForestCursor,    DFC.FileOrDir (..),    -- * Construction and deconstruction    -- ** Make    makeDirForestCursor,    -- ** Rebuild    rebuildDirForestCursor,    DFC.isTopLevel,    -- *** Helper    dirForestCursorPrepareForMovement,    -- ** Lenses    DFC.dirForestCursorForestCursorL,    DFC.dirForestCursorSelectedL,    -- ** Fold    DFC.foldDirForestCursor,    -- * Query    DFC.dirForestCursorSelected,    -- * Movements    dirForestCursorSelectPrevOnSameLevel,    dirForestCursorSelectNextOnSameLevel,    dirForestCursorSelectFirstOnSameLevel,    dirForestCursorSelectLastOnSameLevel,    dirForestCursorSelectPrevTree,    dirForestCursorSelectNextTree,    dirForestCursorSelectFirstTree,    dirForestCursorSelectLastTree,    dirForestCursorSelectPrev,    dirForestCursorSelectNext,    dirForestCursorSelectFirst,    dirForestCursorSelectLast,    dirForestCursorSelectFirstChild,    dirForestCursorSelectLastChild,    dirForestCursorSelectParent,    DFC.dirForestCursorSelectPrevChar,    DFC.dirForestCursorSelectNextChar,    -- * Edits    dirForestCursorDeleteCurrent,    dirForestCursorStartNew,    dirForestCursorStartNewBelowAtStart,    dirForestCursorStartNewBelowAtEnd,    dirForestCursorStopNew,    DFC.dirForestCursorInsertChar,    DFC.dirForestCursorAppendChar,    dirForestCursorRemoveChar,    dirForestCursorDeleteChar,    DFC.dirForestCursorCompleteToDir,    DFC.dirForestCursorCompleteToDir',    DFC.dirForestCursorCompleteToFile,    DFC.dirForestCursorCompleteToFile',    -- * Collapsing    -- ** One level    DFC.dirForestCursorOpen,    DFC.dirForestCursorClose,    DFC.dirForestCursorToggle,    -- ** Recursively    DFC.dirForestCursorOpenRecursively,    DFC.dirForestCursorToggleRecursively,  )whereimport qualified Cursor.DirForest as DFCimport Cursor.Simple.Forestimport Cursor.Typesimport Data.DirForest (DirForest (..))type DirForestCursor a = DFC.DirForestCursor a a-- | Make a 'DirForestCursor'.---- This will fail if the dirforest is empty.makeDirForestCursor :: DirForest a -> Maybe (DirForestCursor a)makeDirForestCursor = DFC.makeDirForestCursor iddirForestCursorPrepareForMovement :: DirForestCursor a -> DeleteOrUpdate (ForestCursor (DFC.FileOrDir a))dirForestCursorPrepareForMovement = DFC.dirForestCursorPrepareForMovement idrebuildDirForestCursor :: DirForestCursor a -> DeleteOrUpdate (DirForest a)rebuildDirForestCursor = DFC.rebuildDirForestCursor id iddirForestCursorSelectPrevOnSameLevel :: DirForestCursor a -> DeleteOrUpdate (Maybe (DirForestCursor a))dirForestCursorSelectPrevOnSameLevel = DFC.dirForestCursorSelectPrevOnSameLevel id iddirForestCursorSelectNextOnSameLevel :: DirForestCursor a -> DeleteOrUpdate (Maybe (DirForestCursor a))dirForestCursorSelectNextOnSameLevel = DFC.dirForestCursorSelectNextOnSameLevel id iddirForestCursorSelectFirstOnSameLevel :: DirForestCursor a -> DeleteOrUpdate (DirForestCursor a)dirForestCursorSelectFirstOnSameLevel = DFC.dirForestCursorSelectFirstOnSameLevel id iddirForestCursorSelectLastOnSameLevel :: DirForestCursor a -> DeleteOrUpdate (DirForestCursor a)dirForestCursorSelectLastOnSameLevel = DFC.dirForestCursorSelectLastOnSameLevel id iddirForestCursorSelectPrevTree :: DirForestCursor a -> DeleteOrUpdate (Maybe (DirForestCursor a))dirForestCursorSelectPrevTree = DFC.dirForestCursorSelectPrevTree id iddirForestCursorSelectNextTree :: DirForestCursor a -> DeleteOrUpdate (Maybe (DirForestCursor a))dirForestCursorSelectNextTree = DFC.dirForestCursorSelectNextTree id iddirForestCursorSelectFirstTree :: DirForestCursor a -> DeleteOrUpdate (DirForestCursor a)dirForestCursorSelectFirstTree = DFC.dirForestCursorSelectFirstTree id iddirForestCursorSelectLastTree :: DirForestCursor a -> DeleteOrUpdate (DirForestCursor a)dirForestCursorSelectLastTree = DFC.dirForestCursorSelectLastTree id iddirForestCursorSelectPrev :: DirForestCursor a -> DeleteOrUpdate (Maybe (DirForestCursor a))dirForestCursorSelectPrev = DFC.dirForestCursorSelectPrev id iddirForestCursorSelectNext :: DirForestCursor a -> DeleteOrUpdate (Maybe (DirForestCursor a))dirForestCursorSelectNext = DFC.dirForestCursorSelectNext id iddirForestCursorSelectFirst :: DirForestCursor a -> DeleteOrUpdate (DirForestCursor a)dirForestCursorSelectFirst = DFC.dirForestCursorSelectFirst id iddirForestCursorSelectLast :: DirForestCursor a -> DeleteOrUpdate (DirForestCursor a)dirForestCursorSelectLast = DFC.dirForestCursorSelectLast id iddirForestCursorSelectFirstChild :: DirForestCursor a -> DeleteOrUpdate (Maybe (DirForestCursor a))dirForestCursorSelectFirstChild = DFC.dirForestCursorSelectFirstChild id iddirForestCursorSelectLastChild :: DirForestCursor a -> DeleteOrUpdate (Maybe (DirForestCursor a))dirForestCursorSelectLastChild = DFC.dirForestCursorSelectLastChild id iddirForestCursorSelectParent :: DirForestCursor a -> DeleteOrUpdate (Maybe (DirForestCursor a))dirForestCursorSelectParent = DFC.dirForestCursorSelectParent id iddirForestCursorDeleteCurrent :: DirForestCursor a -> DeleteOrUpdate (DirForestCursor a)dirForestCursorDeleteCurrent = DFC.dirForestCursorDeleteCurrent iddirForestCursorStartNew :: Maybe (DirForestCursor a) -> Maybe (DirForestCursor a)dirForestCursorStartNew = DFC.dirForestCursorStartNew id iddirForestCursorStartNewBelowAtStart :: DirForestCursor a -> Maybe (DirForestCursor a)dirForestCursorStartNewBelowAtStart = DFC.dirForestCursorStartNewBelowAtStart id iddirForestCursorStartNewBelowAtEnd :: DirForestCursor a -> Maybe (DirForestCursor a)dirForestCursorStartNewBelowAtEnd = DFC.dirForestCursorStartNewBelowAtEnd id iddirForestCursorStopNew :: DirForestCursor a -> Maybe (DeleteOrUpdate (DirForestCursor a))dirForestCursorStopNew = DFC.dirForestCursorStopNew iddirForestCursorRemoveChar :: DirForestCursor a -> Maybe (DeleteOrUpdate (DirForestCursor a))dirForestCursorRemoveChar = DFC.dirForestCursorRemoveChar iddirForestCursorDeleteChar :: DirForestCursor a -> Maybe (DeleteOrUpdate (DirForestCursor a))dirForestCursorDeleteChar = DFC.dirForestCursorDeleteChar id