-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Tools for focusing in on locations within numbers -- -- Focuses are lists of numbers where longer lists are treated as -- focuses on their parent lists. As such, `Focus []` is -- considered unfocused (it is EQ to all focuses), `Focus [1, 1]` -- is EQ to `Focus [1, 1, 3]` because their roots are equal, and so on. -- This isn't useful for testing true equality, but it is quite useful -- for traversing and pruning indexed rose trees from one locus to -- another. @package Focus @version 0.1.2 module Data.Focus data Focus -- | Creation toList :: Focus -> [Int] fromList :: [Int] -> Focus fromString :: String -> Maybe Focus parse :: ReadS Focus split :: String -> (Maybe Focus, String) strip :: String -> String -- | Behavior focus :: Focus -> Focus -> Focus contract :: Focus -> Int -> Focus retract :: Focus -> Focus unfocused :: Focus isUnfocused :: Focus -> Bool instance Read Focus instance Show Focus instance Ord Focus instance Eq Focus module Data.Scope data Scope Scope :: Focus -> Focus -> Scope lower :: Scope -> Focus upper :: Scope -> Focus contains :: Scope -> Focus -> Bool fromTuple :: (Focus, Focus) -> Scope toTuple :: Scope -> (Focus, Focus) everywhere :: Scope isEverywhere :: Scope -> Bool instance Eq Scope instance Ord Scope instance Show Scope