gencheck-0.1.1: A testing framework inspired by QuickCheck and SmallCheck

Safe HaskellSafe-Infered

Test.GenCheck.Base.LabelledPartition

Documentation

class (Foldable (c k), Functor v) => LabelledPartition c k v whereSource

Methods

empty :: c k (v a)Source

new :: Ord k => k -> [a] -> c k (v a)Source

size :: c k (v a) -> IntSource

insert :: Ord k => k -> a -> c k (v a) -> c k (v a)Source

lookup :: Ord k => k -> c k (v a) -> Maybe (v a)Source

merge :: (Ord k, Monoid (v a)) => c k (v a) -> c k (v a) -> c k (v a)Source

map :: Ord k => (k -> a -> r) -> c k (v a) -> c k (v r)Source

fold :: (k -> a -> b -> b) -> b -> c k (v a) -> bSource

toList :: c k (v a) -> [(k, v a)]Source

Instances

fromList :: (LabelledPartition c k v, Ord k, Monoid (v a)) => [(k, [a])] -> c k (v a)Source

relabel :: (LabelledPartition c k v, LabelledPartition c k' v, Ord k') => (k -> a -> k') -> c k (v a) -> c k' (v a)Source

filter :: (LabelledPartition c k v, Ord k) => (k -> a -> Bool) -> c k (v a) -> c k (v a)Source