algebra-driven-design-0.1.1.1: Companion library for the book Algebra-Driven Design by Sandy Maguire

Safe HaskellNone
LanguageHaskell2010

Tiles.Initial

Contents

Synopsis

Observations

rasterize :: Int -> Int -> Tile a -> [[a]] Source #

Rasterize a Tile down into a row-major representation of its constituent "pixels".

rasterize' Source #

Arguments

:: Int

resulting width

-> Int

resulting heigeht

-> Tile a 
-> Compose ZipList ZipList a

the resulting "pixels" in row-major order

Like rasterize', but with a type more convenient for showing off the applicative homomorphism.

Generic constructors

cw :: Tile a -> Tile a Source #

ccw :: Tile a -> Tile a Source #

beside :: Tile a -> Tile a -> Tile a Source #

cols :: Monoid a => [Tile a] -> Tile a Source #

above :: Tile a -> Tile a -> Tile a Source #

rows :: Monoid a => [Tile a] -> Tile a Source #

flipH :: Tile a -> Tile a Source #

flipV :: Tile a -> Tile a Source #

quad :: Tile a -> Tile a -> Tile a -> Tile a -> Tile a Source #

swirl :: Tile a -> Tile a Source #

Color constructors

behind :: Monoid a => Tile a -> Tile a -> Tile a Source #

Special color constructors

Color operations

QuickSpec signatures

Types

data Tile a Source #

Instances
Functor Tile Source # 
Instance details

Defined in Tiles.Initial

Methods

fmap :: (a -> b) -> Tile a -> Tile b #

(<$) :: a -> Tile b -> Tile a #

Applicative Tile Source # 
Instance details

Defined in Tiles.Initial

Methods

pure :: a -> Tile a #

(<*>) :: Tile (a -> b) -> Tile a -> Tile b #

liftA2 :: (a -> b -> c) -> Tile a -> Tile b -> Tile c #

(*>) :: Tile a -> Tile b -> Tile b #

(<*) :: Tile a -> Tile b -> Tile a #

Show a => Show (Tile a) Source # 
Instance details

Defined in Tiles.Initial

Methods

showsPrec :: Int -> Tile a -> ShowS #

show :: Tile a -> String #

showList :: [Tile a] -> ShowS #

Semigroup a => Semigroup (Tile a) Source # 
Instance details

Defined in Tiles.Initial

Methods

(<>) :: Tile a -> Tile a -> Tile a #

sconcat :: NonEmpty (Tile a) -> Tile a #

stimes :: Integral b => b -> Tile a -> Tile a #

Monoid a => Monoid (Tile a) Source # 
Instance details

Defined in Tiles.Initial

Methods

mempty :: Tile a #

mappend :: Tile a -> Tile a -> Tile a #

mconcat :: [Tile a] -> Tile a #

(CoArbitrary a, Arbitrary a) => Arbitrary (Tile a) Source # 
Instance details

Defined in Tiles.Initial

Methods

arbitrary :: Gen (Tile a) #

shrink :: Tile a -> [Tile a] #

Observe test outcome [[a]] => Observe (Small Int, Small Int, test) outcome (Tile a) Source # 
Instance details

Defined in Tiles.Initial

Methods

observe :: (Small Int, Small Int, test) -> Tile a -> outcome #

pattern Color :: Double -> Double -> Double -> Double -> Color Source #

Orphan instances

Semigroup Color Source # 
Instance details

Methods

(<>) :: Color -> Color -> Color #

sconcat :: NonEmpty Color -> Color #

stimes :: Integral b => b -> Color -> Color #

Monoid Color Source # 
Instance details

Methods

mempty :: Color #

mappend :: Color -> Color -> Color #

mconcat :: [Color] -> Color #

Arbitrary PixelRGBA8 Source # 
Instance details

CoArbitrary PixelRGBA8 Source # 
Instance details

Methods

coarbitrary :: PixelRGBA8 -> Gen b -> Gen b #

Observe () Color Color Source # 
Instance details

Methods

observe :: () -> Color -> Color #