-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Fast size comparison for standard containers. -- -- SizeCompare is a small library providing size comparison functions -- standard Haskell data-types. Size compare runs in O(min(n,m)) for both -- arguments, possibly faster. Instead of measuring both containers and -- comparing the result, SizeCompare iteratively deconstructs both sides -- of the equality equation until a conclusion can be made. A common -- expression like: length xs > 0 runs O(n) in the length of the list. -- Sizecompare runs (O(1)) in this particular case: xs |>| 0 This is -- still an initial version of the library and updates may follow after -- some more profiling. @package SizeCompare @version 0.1 module Data.SizeCompare -- | Equality on the size of containers (|==|) :: (Sizeable a, Sizeable b) => a -> b -> Bool -- | Defines Smaller Than on the size of containers (|<|) :: (Sizeable a, Sizeable b) => a -> b -> Bool -- | Defines Smaller Than or Equal on the size of containers (|<=|) :: (Sizeable a, Sizeable b) => a -> b -> Bool -- | Defines Greater Than on the size of containers (|>|) :: (Sizeable a, Sizeable b) => a -> b -> Bool -- | Defines Greate Than or Equal on the size of containers (|>=|) :: (Sizeable a, Sizeable b) => a -> b -> Bool -- | Provides functionality for smartly measuring the size of a container class Sizeable a cSize :: Sizeable a => a -> Maybe Int reduce :: Sizeable a => a -> Maybe a instance Sizeable (Map a b) instance Sizeable (Set a) instance Sizeable [a] instance Sizeable Int