-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | (UNTESTED) Generic splay-based sequence representation
--
-- WARNING: This package is untested and unstable,
-- do not use except for testing. A general sequence representation with
-- arbitary annotations, for use as a base for implementations of various
-- collection types.
@package splay
@version 0.0.2
-- | A generic sequence representation with arbitary annotations, for use
-- as a base for implementations of various collection types
module Data.Splay
-- | A representation of a sequence of values of type a using a
-- splay tree, which can also contain measurements of type s.
data Splay s a
-- | s is a measurement of a
class Monoid s => Measured s a | a -> s
measure :: Measured s a => a -> s
-- | Construct a sequence of only one element
singleton :: Measured s a => a -> Splay s a
-- | Split the sequence into two part: the longest prefix whose measure
-- does not satisfy the predicate, and the rest of the sequence
--
-- The predicate must be monotonic. Note that False <
-- True.
split :: Measured s a => (s -> Bool) -> Splay s a -> (Splay s a, Splay s a)
-- | Concatenate two sequences
(><) :: Measured s a => Splay s a -> Splay s a -> Splay s a
instance Data.Splay.Measured s a => Data.Splay.Measured s (Data.Splay.Internal.Splay s a)