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

docs

parent 94f52718
Pipeline #15891633 passed with stage
in 26 minutes and 30 seconds
......@@ -107,12 +107,19 @@ compress = go . makeCompressable
--------------------------------------------------------------------------------
-- | A node in a radixtree. To advance from here a parser must parse the 'Text'
-- (i.e., the prefix) value at this node.
data RadixNode = RadixNode {-# UNPACK #-} !Text !RadixTree
deriving (Eq, Show, Typeable, Data)
-- | A radixtree. Construct with 'fromFoldable', and use with 'parse'.
data RadixTree
= RadixAccept {-# UNPACK #-} !Text {-# UNPACK #-} !(Vector RadixNode)
| RadixSkip {-# UNPACK #-} !(Vector RadixNode)
= -- | Can terminate a parser successfully, returning the 'Text' value given.
RadixAccept
{-# UNPACK #-} !Text -- the final value to return
{-# UNPACK #-} !(Vector RadixNode) -- possible subtrees beyond this point
| RadixSkip
{-# UNPACK #-} !(Vector RadixNode) -- possible subtrees beyond this point
deriving (Eq, Show, Typeable, Data)
instance NFData RadixNode where
......
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