Commit 3eaf5651 authored by Mike Ledger's avatar Mike Ledger

docs

parent 3d3c881b
Pipeline #15891689 passed with stage
in 29 minutes and 1 second
......@@ -50,8 +50,8 @@ import Text.Parser.Combinators (Parsing (try))
-- packing the final result into an efficient structure using 'Text' nodes.
--
-- TODO:
-- - generate RadixTree directly
-- - just use compact regions?
-- - generate RadixTree directly, instead of going through 'Trie'/'CompressedTrie'
-- - use compact regions?
data PrefixNode a = Accept !Text !a | Skip !a
deriving (Show, Eq)
......@@ -216,6 +216,7 @@ compressBy full@(TI.Text arr _ _) rt =
recompressT (RadixSkip v) = CompressedRadixSkip <$> V.mapM recompressN v
recompressT (RadixAccept t v) = CompressedRadixAccept <$> magic t <*> V.mapM recompressN v
-- | *Slow*
fromFoldable :: Foldable f => f Text -> RadixTree
fromFoldable =
fromTrie . foldr' (\t -> insert t t) (Trie (Skip M.empty))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment