treersec-1: Structure Editing Combinators

Safe HaskellNone
LanguageHaskell2010

Treersec

Documentation

data PP a Source #

Constructors

PP Int [(Int, Widget GraphicTree a)] 

Instances

Functor PP Source # 

Methods

fmap :: (a -> b) -> PP a -> PP b #

(<$) :: a -> PP b -> PP a #

pp_above :: PP a -> PP a -> PP a Source #

pp_beside :: PP a -> PP a -> PP a Source #

pp_alts :: PP a -> PP a -> PP a Source #

straightList :: Foldable t => t (PP a) -> PP a Source #

type Printer a = [PP a] -> [PP a] Source #

data Grammar a Source #

Constructors

Alts [([Grammar a], Printer a)] 
Term (String -> [String]) 
At Int 

llength :: [a] -> Int Source #

gfix :: ((Int -> Grammar a) -> Int -> Grammar a) -> Int -> Grammar a Source #

term :: (String -> [String]) -> Int -> Grammar a Source #

alts :: [([Int -> Grammar a], Printer a)] -> Int -> Grammar a Source #

data Node Source #

Constructors

Placeholder 
Branch Int [Node] 
Leaf String 

Instances

data GrammarZ a Source #

Constructors

GrammarZ (Grammar a) [(Grammar a, (Int, Int))] [(Int, Int)] 

Instances

Eq (GrammarZ a) Source # 

Methods

(==) :: GrammarZ a -> GrammarZ a -> Bool #

(/=) :: GrammarZ a -> GrammarZ a -> Bool #

lastCoords :: Node -> [(Int, Int)] -> [(Int, Int)] Source #

commonCoords :: Eq a => [a] -> [a] -> [a] Source #

getSelection :: GrammarZ a -> Node -> [(Int, Int)] -> [(Int, Int)] -> [[(Int, Int)]] Source #

subCoords :: GrammarZ a -> GrammarZ a -> Node -> [(Int, Int)] -> [(t1, Int)] -> [(t, Int)] -> Maybe [(Int, Int)] Source #

getNode :: Node -> [(Int, Int)] -> Node Source #

cursorBack' :: GrammarZ t -> Node -> [(Int, Int)] -> [(Int, Int)] Source #

cursorBack :: GrammarZ t -> Node -> [(Int, Int)] -> [(Int, Int)] Source #

preOrderCursor :: ([(t1, GrammarZ t)], t2) -> [(Int, Int)] Source #

pp_besides :: [PP a] -> [PP a] Source #

pp_straightList :: [PP a] -> [PP a] Source #

data PPList a Source #

Constructors

PPList [PP a] 

Instances

Functor PPList Source # 

Methods

fmap :: (a -> b) -> PPList a -> PPList b #

(<$) :: a -> PPList b -> PPList a #

renderNode :: (Enum t2, Num t2, Eq t2) => Bool -> [[(t3, t2)]] -> ([(Int, t2)] -> String -> Bool -> PPList t1) -> ([(Int, t2)] -> Bool -> PPList t1) -> Maybe ([(t, t2)], PPList t1) -> GrammarZ t1 -> Node -> Widget GraphicTree t1 Source #

edit :: (forall a. GrammarZ a) -> Node -> Widget GraphicTree z Source #

str :: [Char] -> Int -> Grammar a Source #

sepListNE :: (Int -> Grammar a) -> (Int -> Grammar a) -> Int -> Grammar a Source #