battleship-combinatorics-0.0: Compute number of possible arrangements in the battleship game

Safe HaskellSafe
LanguageHaskell98

Combinatorics.Battleship.Count.Counter

Documentation

class C a where Source #

Minimal complete definition

zero, one, add

Methods

zero, one :: a Source #

add :: a -> a -> a Source #

Instances

C Word8 Source # 
C Word32 Source # 
C Word64 Source # 
(C hi, C lo, Ord lo) => C (Composed hi lo) Source # 

Methods

zero :: Composed hi lo Source #

one :: Composed hi lo Source #

add :: Composed hi lo -> Composed hi lo -> Composed hi lo Source #

(Nat w, Nat h, C a, Storable a) => C (Distr w h a) Source # 

Methods

zero :: Distr w h a Source #

one :: Distr w h a Source #

add :: Distr w h a -> Distr w h a -> Distr w h a Source #

data Composed hi lo Source #

Instances

(Eq lo, Eq hi) => Eq (Composed hi lo) Source # 

Methods

(==) :: Composed hi lo -> Composed hi lo -> Bool #

(/=) :: Composed hi lo -> Composed hi lo -> Bool #

(Ord lo, Ord hi) => Ord (Composed hi lo) Source # 

Methods

compare :: Composed hi lo -> Composed hi lo -> Ordering #

(<) :: Composed hi lo -> Composed hi lo -> Bool #

(<=) :: Composed hi lo -> Composed hi lo -> Bool #

(>) :: Composed hi lo -> Composed hi lo -> Bool #

(>=) :: Composed hi lo -> Composed hi lo -> Bool #

max :: Composed hi lo -> Composed hi lo -> Composed hi lo #

min :: Composed hi lo -> Composed hi lo -> Composed hi lo #

(Integ hi, Integ lo) => Show (Composed hi lo) Source # 

Methods

showsPrec :: Int -> Composed hi lo -> ShowS #

show :: Composed hi lo -> String #

showList :: [Composed hi lo] -> ShowS #

(Arbitrary a, Arbitrary b) => Arbitrary (Composed a b) Source # 

Methods

arbitrary :: Gen (Composed a b) #

shrink :: Composed a b -> [Composed a b] #

(Storable a, Storable b) => Storable (Composed a b) Source #

This instance expects that there is no need for padding for alignment

Methods

sizeOf :: Composed a b -> Int #

alignment :: Composed a b -> Int #

peekElemOff :: Ptr (Composed a b) -> Int -> IO (Composed a b) #

pokeElemOff :: Ptr (Composed a b) -> Int -> Composed a b -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Composed a b) #

pokeByteOff :: Ptr b -> Int -> Composed a b -> IO () #

peek :: Ptr (Composed a b) -> IO (Composed a b) #

poke :: Ptr (Composed a b) -> Composed a b -> IO () #

(C hi, C lo, Ord lo) => C (Composed hi lo) Source # 

Methods

zero :: Composed hi lo Source #

one :: Composed hi lo Source #

add :: Composed hi lo -> Composed hi lo -> Composed hi lo Source #

zero, one :: C a => a Source #

zero, one :: C a => a Source #

add :: C a => a -> a -> a Source #

sum :: C a => [a] -> a Source #

toInteger :: Integ a => a -> Integer Source #