Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- data UPTrie t x where
- suppliment :: (t -> Maybe r) -> t -> UPTrie t (r -> x) -> Maybe (UPTrie t x)
- tagUPTrie :: UPTrie t x -> t
- measureDepthRelative :: ([Int] -> Int) -> UPTrie t x -> Int
- minDepth :: UPTrie t x -> Int
- maxDepth :: UPTrie t x -> Int
- showTail :: Show t => UPTrie t x -> String
- assignLit :: Eq t => Path t -> Maybe x -> UPTrie t x -> UPTrie t x
- elem :: Eq t => Path t -> UPTrie t x -> Bool
- lookup :: Eq t => Path t -> UPTrie t x -> Maybe x
- lookupWithL :: Eq t => (t -> t) -> Path t -> UPTrie t x -> Maybe x
- lookupNearestParent :: Eq t => Path t -> UPTrie t x -> Maybe x
- lookupThrough :: Eq t => Path t -> UPTrie t x -> [x]
- firstNonEmpty :: [[a]] -> [a]
- merge :: Eq t => UPTrie t x -> UPTrie t x -> UPTrie t x
- areDisjoint :: Eq t => UPTrie t x -> UPTrie t x -> Bool
- litSingletonTail :: Path t -> x -> UPTrie t x
- litExtrudeTail :: [t] -> UPTrie t x -> UPTrie t x
- sort :: Eq t => [UPTrie t x] -> [UPTrie t x]
Documentation
suppliment :: (t -> Maybe r) -> t -> UPTrie t (r -> x) -> Maybe (UPTrie t x) Source
Given a parser and a chunk, take a trie expecting a result, and possibly return a reduced trie without the expectation.
measureDepthRelative :: ([Int] -> Int) -> UPTrie t x -> Int Source
Measure the depth of a trie, based on the relation of other adjacent depths
assignLit :: Eq t => Path t -> Maybe x -> UPTrie t x -> UPTrie t x Source
Assigns a value to literal constructors
lookupWithL :: Eq t => (t -> t) -> Path t -> UPTrie t x -> Maybe x Source
Apply a transform f
to the final path chunk, when matching a literal
cell - used for eliminating file extensions in nested-routes.
lookupNearestParent :: Eq t => Path t -> UPTrie t x -> Maybe x Source
lookupThrough :: Eq t => Path t -> UPTrie t x -> [x] Source
Return all nodes passed during a lookup
firstNonEmpty :: [[a]] -> [a] Source
merge :: Eq t => UPTrie t x -> UPTrie t x -> UPTrie t x Source
Overwrites when similar, leaves untouched when not
litSingletonTail :: Path t -> x -> UPTrie t x Source
Create a singleton trie out of literal constructors
litExtrudeTail :: [t] -> UPTrie t x -> UPTrie t x Source
Push a trie down with literal constructors