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

Safe HaskellNone
LanguageHaskell2010

Game.Mastermind.CodeSet

Synopsis

Documentation

class C set where Source #

Methods

empty :: set a Source #

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

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

unit :: set a Source #

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

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

symbols :: Enum a => set a -> EnumSet a Source #

null :: set a -> Bool Source #

size :: set a -> Integer Source #

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

representationSize :: set a -> Int Source #

compress :: Enum 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 :: Enum a => T a -> T a -> T a Source #

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

unit :: T a Source #

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

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

symbols :: Enum a => T a -> EnumSet a Source #

null :: T a -> Bool Source #

size :: T a -> Integer Source #

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

representationSize :: T a -> Int Source #

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

C T Source # 
Instance details

Defined in Game.Mastermind.CodeSet.Tree

Methods

empty :: T a Source #

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

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

unit :: T a Source #

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

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

symbols :: Enum a => T a -> EnumSet a Source #

null :: T a -> Bool Source #

size :: T a -> Integer Source #

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

representationSize :: T a -> Int Source #

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

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

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

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

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

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

Like leftNonEmptyProduct but the left operand can be empty.

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