{-# LANGUAGE MultiParamTypeClasses #-}
module Pigy.Image.Types (
Chromosome
, Phenotype(..)
, Phenable(..)
, Upgradeable(..)
) where
import Codec.Picture (PixelRGBA8(..))
type Chromosome = String
class Upgradeable g h where
upgrade :: g
-> h
data Phenotype =
Phenotype
{
Phenotype -> Float
skinHue :: Float
, Phenotype -> PixelRGBA8
eyeColor :: PixelRGBA8
, Phenotype -> PixelRGBA8
pupilColor :: PixelRGBA8
, Phenotype -> PixelRGBA8
noseColor :: PixelRGBA8
, Phenotype -> Float
aspect :: Float
, Phenotype -> (Float, Float)
headScale :: (Float, Float)
, Phenotype -> (Float, Float)
eyeScale :: (Float, Float)
, Phenotype -> (Float, Float)
noseScale :: (Float, Float)
, Phenotype -> (Float, Float)
earScale :: (Float, Float)
, Phenotype -> Float
bodyScale :: Float
, Phenotype -> Float
eyeAngle :: Float
, Phenotype -> Float
eyeFraction :: Float
}
deriving (Phenotype -> Phenotype -> Bool
(Phenotype -> Phenotype -> Bool)
-> (Phenotype -> Phenotype -> Bool) -> Eq Phenotype
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Phenotype -> Phenotype -> Bool
$c/= :: Phenotype -> Phenotype -> Bool
== :: Phenotype -> Phenotype -> Bool
$c== :: Phenotype -> Phenotype -> Bool
Eq, Eq Phenotype
Eq Phenotype
-> (Phenotype -> Phenotype -> Ordering)
-> (Phenotype -> Phenotype -> Bool)
-> (Phenotype -> Phenotype -> Bool)
-> (Phenotype -> Phenotype -> Bool)
-> (Phenotype -> Phenotype -> Bool)
-> (Phenotype -> Phenotype -> Phenotype)
-> (Phenotype -> Phenotype -> Phenotype)
-> Ord Phenotype
Phenotype -> Phenotype -> Bool
Phenotype -> Phenotype -> Ordering
Phenotype -> Phenotype -> Phenotype
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Phenotype -> Phenotype -> Phenotype
$cmin :: Phenotype -> Phenotype -> Phenotype
max :: Phenotype -> Phenotype -> Phenotype
$cmax :: Phenotype -> Phenotype -> Phenotype
>= :: Phenotype -> Phenotype -> Bool
$c>= :: Phenotype -> Phenotype -> Bool
> :: Phenotype -> Phenotype -> Bool
$c> :: Phenotype -> Phenotype -> Bool
<= :: Phenotype -> Phenotype -> Bool
$c<= :: Phenotype -> Phenotype -> Bool
< :: Phenotype -> Phenotype -> Bool
$c< :: Phenotype -> Phenotype -> Bool
compare :: Phenotype -> Phenotype -> Ordering
$ccompare :: Phenotype -> Phenotype -> Ordering
$cp1Ord :: Eq Phenotype
Ord, Int -> Phenotype -> ShowS
[Phenotype] -> ShowS
Phenotype -> String
(Int -> Phenotype -> ShowS)
-> (Phenotype -> String)
-> ([Phenotype] -> ShowS)
-> Show Phenotype
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Phenotype] -> ShowS
$cshowList :: [Phenotype] -> ShowS
show :: Phenotype -> String
$cshow :: Phenotype -> String
showsPrec :: Int -> Phenotype -> ShowS
$cshowsPrec :: Int -> Phenotype -> ShowS
Show)
class Phenable g where
toPhenotype :: g
-> Phenotype