board-games-0.2: Three games for inclusion in a web server

Safe HaskellSafe
LanguageHaskell2010

Game.Mastermind.CodeSet

Synopsis

Documentation

class C set where Source #

Methods

empty :: set a Source #

union :: Ord a => set a -> set a -> set a Source #

intersection :: Ord a => set a -> set a -> set a Source #

unit :: set a Source #

leftNonEmptyProduct :: T a -> set a -> set a Source #

flatten :: Ord a => set a -> [[a]] Source #

symbols :: Ord a => set a -> Set a Source #

null :: set a -> Bool Source #

size :: set a -> Integer Source #

select :: set a -> Integer -> [a] Source #

representationSize :: set a -> Int Source #

compress :: Ord a => set a -> set a Source #

simplify set representation by combining set products where possible

Instances
C T Source # 
Instance details

Defined in Game.Mastermind.CodeSet.Union

Methods

empty :: T a Source #

union :: Ord a => T a -> T a -> T a Source #

intersection :: Ord a => T a -> T a -> T a Source #

unit :: T a Source #

leftNonEmptyProduct :: T0 a -> T a -> T a Source #

flatten :: Ord a => T a -> [[a]] Source #

symbols :: Ord a => T a -> Set a Source #

null :: T a -> Bool Source #

size :: T a -> Integer Source #

select :: T a -> Integer -> [a] Source #

representationSize :: T a -> Int Source #

compress :: Ord a => T a -> T a Source #

C T Source # 
Instance details

Defined in Game.Mastermind.CodeSet.Tree

Methods

empty :: T a Source #

union :: Ord a => T a -> T a -> T a Source #

intersection :: Ord a => T a -> T a -> T a Source #

unit :: T a Source #

leftNonEmptyProduct :: T0 a -> T a -> T a Source #

flatten :: Ord a => T a -> [[a]] Source #

symbols :: Ord a => T a -> Set a Source #

null :: T a -> Bool Source #

size :: T a -> Integer Source #

select :: T a -> Integer -> [a] Source #

representationSize :: T a -> Int Source #

compress :: Ord a => T a -> T a Source #

cube :: C set => T a -> Int -> set a Source #

unions :: (C set, Ord a) => [set a] -> set a Source #

intersections :: (C set, Ord a) => T [] (set a) -> set a Source #

intersectionsPQ :: (C set, Ord a) => T [] (set a) -> set a Source #

(*&) :: (C set, Ord a) => Set a -> set a -> set a infixr 5 Source #

Like leftNonEmptyProduct but the left operand can be empty.

(#*&) :: C set => a -> set a -> set a infixr 5 Source #