ecstasy-0.2.0.1: A GHC.Generics based entity component system.

Safe HaskellNone
LanguageHaskell2010

Data.Ecstasy

Contents

Description

Ecstasy is a library architected around the HKD pattern, the gist of which is to define a "template" type that can be reused for several purposes. Users of ecstasy should define a record type of Components parameterized over a variable of kind StorageType:

  data World s = Entity
    { position :: Component s 'Field (V2 Double)
    , graphics :: Component s 'Field Graphics
    , isPlayer :: Component s 'Unique ()
    }
    deriving (Generic)

Ensure that this type have an instance of Generic.

For usability, it might be desirable to also define the following type synonym:

  type Entity = World 'FieldOf

which is the only form of the World that most users of ecstasy will need to interact with.

Throughout this document there are references to the HasWorld and HasWorld' classes, which are implementation details and provided automatically by the library.

Synopsis

Defining components

Components are pieces of data that may or may not exist on a particular entity. In fact, an Ent is nothing more than an identifier, against which components are linked.

Components classified by their ComponentType, which describes the semantics behind a component.

Field
A Field is a "normal" component and corresponds exactly to a Maybe value.
Unique
A Unique component may only exist on a single entity at a given time. They are often used to annotate "notable" entites, such as whom the camera should be following.
Virtual
A Virtual component is defined in terms of monadic vget and vset actions, rather than having dedicated storage in the ECS. Virtual components are often used to connect to external systems, eg. to a 3rd party physics engine which wants to own its own data. For more information on using virtual components, see defStorage.

data ComponentType Source #

Data kind used to parameterize the fields of the ECS record.

Constructors

Field

This component can be owned by any entity.

Unique

This component can be owned by only a single entity at a time.

Virtual

This component is owned by another system.

type family Component (s :: StorageType) (c :: ComponentType) (a :: Type) :: Type where ... Source #

A type family to be used in your ECS recrod.

Storage

defStorage provides a suitable container for storing entity data, to be used with runSystemT and friends. If you are not using any Virtual components, it can be used directly.

However, when using Virtual components, the VTable for each must be set on defStorage before being given as a parameter to runSystemT. For example, we can write a virtual String component that writes its updates to stdout:

  data World s = Entity
    { stdout :: Component s 'Virtual String
    }
    deriving (Generic)

 main :: IO ()
 main = do
   let storage = defStorage
         { stdout = VTable
             { vget = \_   -> pure Nothing
             , vset = \_ m -> for_ m putStrLn
             }
         }
   runSystemT storage $ do
     void $ createEntity 'unchanged
       { stdout = Just "hello world"
       }

In this example, if you were to use defStorage rather than storage as the argument to runSystemT, you would receive the following error:

unset VTable for Virtual component 'stdout'

defStorage :: HasWorld world m => world (WorldOf m) Source #

The default world, which contains only empty containers.

data StorageType Source #

Data kind used to parameterize the ECS record.

Constructors

FieldOf

Used to describe the actual entity.

WorldOf (Type -> Type)

Used to construct the world's storage.

SetterOf

Used to construct a setter to update an entity.

The SystemT monad

The SystemT transformer provides capabilities for creating, modifying, reading and deleting entities, as well as performing <#traversals query traversals> over them. It is the main monad of ecstasy.

data SystemT w m a Source #

A monad transformer over an ECS given a world w.

Instances

MonadWriter ww m => MonadWriter ww (SystemT w m) Source # 

Methods

writer :: (a, ww) -> SystemT w m a #

tell :: ww -> SystemT w m () #

listen :: SystemT w m a -> SystemT w m (a, ww) #

pass :: SystemT w m (a, ww -> ww) -> SystemT w m a #

MonadState s m => MonadState s (SystemT w m) Source # 

Methods

get :: SystemT w m s #

put :: s -> SystemT w m () #

state :: (s -> (a, s)) -> SystemT w m a #

MonadReader r m => MonadReader r (SystemT w m) Source # 

Methods

ask :: SystemT w m r #

local :: (r -> r) -> SystemT w m a -> SystemT w m a #

reader :: (r -> a) -> SystemT w m a #

MonadTrans (SystemT w) Source # 

Methods

lift :: Monad m => m a -> SystemT w m a #

Monad m => Monad (SystemT w m) Source # 

Methods

(>>=) :: SystemT w m a -> (a -> SystemT w m b) -> SystemT w m b #

(>>) :: SystemT w m a -> SystemT w m b -> SystemT w m b #

return :: a -> SystemT w m a #

fail :: String -> SystemT w m a #

Functor m => Functor (SystemT w m) Source # 

Methods

fmap :: (a -> b) -> SystemT w m a -> SystemT w m b #

(<$) :: a -> SystemT w m b -> SystemT w m a #

Monad m => Applicative (SystemT w m) Source # 

Methods

pure :: a -> SystemT w m a #

(<*>) :: SystemT w m (a -> b) -> SystemT w m a -> SystemT w m b #

liftA2 :: (a -> b -> c) -> SystemT w m a -> SystemT w m b -> SystemT w m c #

(*>) :: SystemT w m a -> SystemT w m b -> SystemT w m b #

(<*) :: SystemT w m a -> SystemT w m b -> SystemT w m a #

MonadIO m => MonadIO (SystemT w m) Source # 

Methods

liftIO :: IO a -> SystemT w m a #

runSystemT :: Monad m => world (WorldOf m) -> SystemT world m a -> m a Source #

Evaluate a SystemT.

yieldSystemT :: Monad m => SystemState world m -> SystemT world m a -> m (SystemState world m, a) Source #

Provides a resumable SystemT. This is a pretty big hack until I come up with a better formalization for everything.

type System w = SystemT w Identity Source #

A monad over an ECS given a world w.

runSystem :: world (WorldOf Identity) -> System world a -> a Source #

Evaluate a System.

type SystemState w m = (Int, w (WorldOf m)) Source #

The internal state of the SystemT monad.

Working with SystemT

createEntity :: (HasWorld world m, Monad m) => world FieldOf -> SystemT world m Ent Source #

Create a new entity.

newEntity :: HasWorld' world => world FieldOf Source #

The default entity, owning no components.

getEntity :: (HasWorld world m, Monad m) => Ent -> SystemT world m (world FieldOf) Source #

Fetches an entity from the world given its Ent.

setEntity :: HasWorld world m => Ent -> world SetterOf -> SystemT world m () Source #

Updates an Ent in the world given its setter.

deleteEntity :: (HasWorld world m, Monad m) => Ent -> SystemT world m () Source #

Delete an entity.

SystemT traversals

SystemT provides functionality for traversing over entities that match a EntTarget and a query. The functions emap and eover return a world 'SetterOf, corresponding to partial update of the targeted entity.

A world 'SetterOf is the world record where all of its selectors have the type Update a. For example, given a world:

  data World s = Entity
    { position :: Component s 'Field (V2 Double)
    , graphics :: Component s 'Field Graphics
    , isPlayer :: Component s 'Unique ()
    }

then World 'SetterOf is equivalent to the following definition:

  data World 'SetterOf = Entity
    { position :: Update (V2 Double)
    , graphics :: Update Graphics
    , isPlayer :: Update ()
    }

unchanged provides a world 'SetterOf which will update no components, and can have partial modifications added to it.

delEntity provides a world 'SetterOf which will delete all components associated with the targeted entity.

emap :: (HasWorld world m, Monad m) => EntTarget world m -> QueryT world m (world SetterOf) -> SystemT world m () Source #

Map a QueryT transformation over all entites that match it.

efor :: (HasWorld world m, Monad m) => EntTarget world m -> QueryT world m a -> SystemT world m [a] Source #

Collect the results of a monadic computation over every entity matching a QueryT.

eover :: (HasWorld world m, Monad m) => EntTarget world m -> QueryT world m (a, world SetterOf) -> SystemT world m [a] Source #

Do an emap and an efor at the same time.

unchanged :: HasWorld' world => world SetterOf Source #

The default setter, which keeps all components with their previous value.

delEntity :: HasWorld' world => world SetterOf Source #

A setter which will delete the entity if its QueryT matches.

Entity targets

type EntTarget world m = SystemT world m [Ent] Source #

An EntTarget is a set of Ents to iterate over.

allEnts :: Monad m => EntTarget world m Source #

Iterate over all entities.

someEnts :: Monad m => [Ent] -> EntTarget world m Source #

Iterate over some entities.

anEnt :: Monad m => Ent -> EntTarget world m Source #

Iterate over an entity.

The QueryT monad

The QueryT transformer provides an environment for querying components of an entity. Due to its MonadPlus instance, failing queries will prevent further computations in the monad from running.

data QueryT w m a Source #

A computation to run over a particular entity.

Instances

MonadWriter ww m => MonadWriter ww (QueryT w m) Source # 

Methods

writer :: (a, ww) -> QueryT w m a #

tell :: ww -> QueryT w m () #

listen :: QueryT w m a -> QueryT w m (a, ww) #

pass :: QueryT w m (a, ww -> ww) -> QueryT w m a #

MonadState s m => MonadState s (QueryT w m) Source # 

Methods

get :: QueryT w m s #

put :: s -> QueryT w m () #

state :: (s -> (a, s)) -> QueryT w m a #

MonadReader r m => MonadReader r (QueryT w m) Source # 

Methods

ask :: QueryT w m r #

local :: (r -> r) -> QueryT w m a -> QueryT w m a #

reader :: (r -> a) -> QueryT w m a #

MonadTrans (QueryT w) Source # 

Methods

lift :: Monad m => m a -> QueryT w m a #

Monad m => Monad (QueryT w m) Source # 

Methods

(>>=) :: QueryT w m a -> (a -> QueryT w m b) -> QueryT w m b #

(>>) :: QueryT w m a -> QueryT w m b -> QueryT w m b #

return :: a -> QueryT w m a #

fail :: String -> QueryT w m a #

Functor m => Functor (QueryT w m) Source # 

Methods

fmap :: (a -> b) -> QueryT w m a -> QueryT w m b #

(<$) :: a -> QueryT w m b -> QueryT w m a #

Monad m => Applicative (QueryT w m) Source # 

Methods

pure :: a -> QueryT w m a #

(<*>) :: QueryT w m (a -> b) -> QueryT w m a -> QueryT w m b #

liftA2 :: (a -> b -> c) -> QueryT w m a -> QueryT w m b -> QueryT w m c #

(*>) :: QueryT w m a -> QueryT w m b -> QueryT w m b #

(<*) :: QueryT w m a -> QueryT w m b -> QueryT w m a #

MonadIO m => MonadIO (QueryT w m) Source # 

Methods

liftIO :: IO a -> QueryT w m a #

Monad m => Alternative (QueryT w m) Source # 

Methods

empty :: QueryT w m a #

(<|>) :: QueryT w m a -> QueryT w m a -> QueryT w m a #

some :: QueryT w m a -> QueryT w m [a] #

many :: QueryT w m a -> QueryT w m [a] #

Monad m => MonadPlus (QueryT w m) Source # 

Methods

mzero :: QueryT w m a #

mplus :: QueryT w m a -> QueryT w m a -> QueryT w m a #

runQueryT :: (HasWorld world m, Monad m) => Ent -> QueryT world m a -> SystemT world m (Maybe a) Source #

Run a QueryT over a particular Ent.

Queries

The QueryT monad provides functionality for performing computations over an Ent's components. The basic primitive is query, which will pull the value of a component, and fail the query if it isn't set.

For example, given the following world:

  data World s = Entity
    { position :: Component s 'Field (V2 Double)
    , velocity :: Component s 'Field (V2 Double)
    }
    deriving (Generic)

we could model a discrete time simulation via:

  stepTime :: System World ()
  stepTime = do
    emap allEnts $ do
      pos <- query position
      vel <- query velocity
      pure $ unchanged
        { position = Set $ pos + vel
        }

which will add an entity's velocity to its position, so long as it has both components to begin with.

query :: Monad m => (world FieldOf -> Maybe a) -> QueryT world m a Source #

Get the value of a component, failing the QueryT if it isn't present.

with :: Monad m => (world FieldOf -> Maybe a) -> QueryT world m () Source #

Only evaluate this QueryT for entities which have the given component.

without :: Monad m => (world FieldOf -> Maybe a) -> QueryT world m () Source #

Only evaluate this QueryT for entities which do not have the given component.

queryEnt :: Monad m => QueryT world m Ent Source #

Get the Ent for whom this query is running.

queryMaybe :: Monad m => (world FieldOf -> Maybe a) -> QueryT world m (Maybe a) Source #

Attempt to get the value of a component.

queryFlag :: Monad m => (world FieldOf -> Maybe ()) -> QueryT world m Bool Source #

Query a flag as a Bool.

queryDef :: Monad m => z -> (world FieldOf -> Maybe z) -> QueryT world m z Source #

Perform a query with a default.

Updates

data Update a Source #

Describes how we can change an a.

Constructors

Keep

Keep the current value.

Unset

Delete the current value if it exists.

Set !a

Set the current value.

Instances

Functor Update Source # 

Methods

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

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

Foldable Update Source # 

Methods

fold :: Monoid m => Update m -> m #

foldMap :: Monoid m => (a -> m) -> Update a -> m #

foldr :: (a -> b -> b) -> b -> Update a -> b #

foldr' :: (a -> b -> b) -> b -> Update a -> b #

foldl :: (b -> a -> b) -> b -> Update a -> b #

foldl' :: (b -> a -> b) -> b -> Update a -> b #

foldr1 :: (a -> a -> a) -> Update a -> a #

foldl1 :: (a -> a -> a) -> Update a -> a #

toList :: Update a -> [a] #

null :: Update a -> Bool #

length :: Update a -> Int #

elem :: Eq a => a -> Update a -> Bool #

maximum :: Ord a => Update a -> a #

minimum :: Ord a => Update a -> a #

sum :: Num a => Update a -> a #

product :: Num a => Update a -> a #

Traversable Update Source # 

Methods

traverse :: Applicative f => (a -> f b) -> Update a -> f (Update b) #

sequenceA :: Applicative f => Update (f a) -> f (Update a) #

mapM :: Monad m => (a -> m b) -> Update a -> m (Update b) #

sequence :: Monad m => Update (m a) -> m (Update a) #

GDefault False (K1 * i (Update c)) Source # 

Methods

gdef :: K1 * i (Update c) a Source #

GDefault True (K1 * i (Update c)) Source # 

Methods

gdef :: K1 * i (Update c) a Source #

Applicative m => GSetEntity m (K1 * i (Update a)) (K1 * i' (IntMap a)) Source # 

Methods

gSetEntity :: K1 * i (Update a) x -> Int -> K1 * i' (IntMap a) x -> m (K1 * i' (IntMap a) x) Source #

Applicative m => GSetEntity m (K1 * i (Update a)) (K1 * i' (VTable m a)) Source # 

Methods

gSetEntity :: K1 * i (Update a) x -> Int -> K1 * i' (VTable m a) x -> m (K1 * i' (VTable m a) x) Source #

Applicative m => GSetEntity m (K1 * i (Update a)) (K1 * i' (Maybe (Int, a))) Source # 

Methods

gSetEntity :: K1 * i (Update a) x -> Int -> K1 * i' (Maybe (Int, a)) x -> m (K1 * i' (Maybe (Int, a)) x) Source #

Eq a => Eq (Update a) Source # 

Methods

(==) :: Update a -> Update a -> Bool #

(/=) :: Update a -> Update a -> Bool #

Ord a => Ord (Update a) Source # 

Methods

compare :: Update a -> Update a -> Ordering #

(<) :: Update a -> Update a -> Bool #

(<=) :: Update a -> Update a -> Bool #

(>) :: Update a -> Update a -> Bool #

(>=) :: Update a -> Update a -> Bool #

max :: Update a -> Update a -> Update a #

min :: Update a -> Update a -> Update a #

Read a => Read (Update a) Source # 
Show a => Show (Update a) Source # 

Methods

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

show :: Update a -> String #

showList :: [Update a] -> ShowS #

GConvertSetter (K1 * i (Maybe a)) (K1 * i' (Update a)) Source # 

Methods

gConvertSetter :: K1 * i (Maybe a) x -> K1 * i' (Update a) x Source #

GConvertSetter (K1 * i a) (K1 * i' (Update a)) Source # 

Methods

gConvertSetter :: K1 * i a x -> K1 * i' (Update a) x Source #

maybeToUpdate :: Maybe a -> Update a Source #

Turn a Maybe into an Update.

Miscellany

data Ent Source #

The key for an entity.

Instances

Eq Ent Source # 

Methods

(==) :: Ent -> Ent -> Bool #

(/=) :: Ent -> Ent -> Bool #

Ord Ent Source # 

Methods

compare :: Ent -> Ent -> Ordering #

(<) :: Ent -> Ent -> Bool #

(<=) :: Ent -> Ent -> Bool #

(>) :: Ent -> Ent -> Bool #

(>=) :: Ent -> Ent -> Bool #

max :: Ent -> Ent -> Ent #

min :: Ent -> Ent -> Ent #

Show Ent Source # 

Methods

showsPrec :: Int -> Ent -> ShowS #

show :: Ent -> String #

showList :: [Ent] -> ShowS #

data VTable m a Source #

A collection of methods necessary to dispatch reads and writes to a Virtual component.

Constructors

VTable 

Fields

  • vget :: !(Ent -> m (Maybe a))

    Get the value of an entity's component.

  • vset :: !(Ent -> Update a -> m ())

    Update the value of an entity's component.

Instances

Applicative m => GSetEntity m (K1 * i (Update a)) (K1 * i' (VTable m a)) Source # 

Methods

gSetEntity :: K1 * i (Update a) x -> Int -> K1 * i' (VTable m a) x -> m (K1 * i' (VTable m a) x) Source #

Applicative m => GGetEntity m (K1 * i (VTable m a)) (K1 * i' (Maybe a)) Source # 

Methods

gGetEntity :: K1 * i (VTable m a) x -> Int -> m (K1 * i' (Maybe a) x) Source #

(Applicative m, KnownSymbol sym) => GDefault keep (M1 * S (MetaSel (Just Symbol sym) x y z) (K1 * i (VTable m a))) Source # 

Methods

gdef :: M1 * S (MetaSel (Just Symbol sym) x y z) (K1 * i (VTable m a)) a Source #

Re-exports

class Generic a #

Representable types of kind *. This class is derivable in GHC with the DeriveGeneric flag on.

Minimal complete definition

from, to

Instances

Generic Bool 

Associated Types

type Rep Bool :: * -> * #

Methods

from :: Bool -> Rep Bool x #

to :: Rep Bool x -> Bool #

Generic Ordering 

Associated Types

type Rep Ordering :: * -> * #

Methods

from :: Ordering -> Rep Ordering x #

to :: Rep Ordering x -> Ordering #

Generic () 

Associated Types

type Rep () :: * -> * #

Methods

from :: () -> Rep () x #

to :: Rep () x -> () #

Generic Fixity 

Associated Types

type Rep Fixity :: * -> * #

Methods

from :: Fixity -> Rep Fixity x #

to :: Rep Fixity x -> Fixity #

Generic Associativity 

Associated Types

type Rep Associativity :: * -> * #

Generic SourceUnpackedness 
Generic SourceStrictness 
Generic DecidedStrictness 
Generic [a] 

Associated Types

type Rep [a] :: * -> * #

Methods

from :: [a] -> Rep [a] x #

to :: Rep [a] x -> [a] #

Generic (Maybe a) 

Associated Types

type Rep (Maybe a) :: * -> * #

Methods

from :: Maybe a -> Rep (Maybe a) x #

to :: Rep (Maybe a) x -> Maybe a #

Generic (Par1 p) 

Associated Types

type Rep (Par1 p) :: * -> * #

Methods

from :: Par1 p -> Rep (Par1 p) x #

to :: Rep (Par1 p) x -> Par1 p #

Generic (ZipList a) 

Associated Types

type Rep (ZipList a) :: * -> * #

Methods

from :: ZipList a -> Rep (ZipList a) x #

to :: Rep (ZipList a) x -> ZipList a #

Generic (Identity a) 

Associated Types

type Rep (Identity a) :: * -> * #

Methods

from :: Identity a -> Rep (Identity a) x #

to :: Rep (Identity a) x -> Identity a #

Generic (Either a b) 

Associated Types

type Rep (Either a b) :: * -> * #

Methods

from :: Either a b -> Rep (Either a b) x #

to :: Rep (Either a b) x -> Either a b #

Generic (V1 k p) 

Associated Types

type Rep (V1 k p) :: * -> * #

Methods

from :: V1 k p -> Rep (V1 k p) x #

to :: Rep (V1 k p) x -> V1 k p #

Generic (U1 k p) 

Associated Types

type Rep (U1 k p) :: * -> * #

Methods

from :: U1 k p -> Rep (U1 k p) x #

to :: Rep (U1 k p) x -> U1 k p #

Generic (a, b) 

Associated Types

type Rep (a, b) :: * -> * #

Methods

from :: (a, b) -> Rep (a, b) x #

to :: Rep (a, b) x -> (a, b) #

Generic (WrappedMonad m a) 

Associated Types

type Rep (WrappedMonad m a) :: * -> * #

Methods

from :: WrappedMonad m a -> Rep (WrappedMonad m a) x #

to :: Rep (WrappedMonad m a) x -> WrappedMonad m a #

Generic (Proxy k t) 

Associated Types

type Rep (Proxy k t) :: * -> * #

Methods

from :: Proxy k t -> Rep (Proxy k t) x #

to :: Rep (Proxy k t) x -> Proxy k t #

Generic (Rec1 k f p) 

Associated Types

type Rep (Rec1 k f p) :: * -> * #

Methods

from :: Rec1 k f p -> Rep (Rec1 k f p) x #

to :: Rep (Rec1 k f p) x -> Rec1 k f p #

Generic (URec k (Ptr ()) p) 

Associated Types

type Rep (URec k (Ptr ()) p) :: * -> * #

Methods

from :: URec k (Ptr ()) p -> Rep (URec k (Ptr ()) p) x #

to :: Rep (URec k (Ptr ()) p) x -> URec k (Ptr ()) p #

Generic (URec k Char p) 

Associated Types

type Rep (URec k Char p) :: * -> * #

Methods

from :: URec k Char p -> Rep (URec k Char p) x #

to :: Rep (URec k Char p) x -> URec k Char p #

Generic (URec k Double p) 

Associated Types

type Rep (URec k Double p) :: * -> * #

Methods

from :: URec k Double p -> Rep (URec k Double p) x #

to :: Rep (URec k Double p) x -> URec k Double p #

Generic (URec k Float p) 

Associated Types

type Rep (URec k Float p) :: * -> * #

Methods

from :: URec k Float p -> Rep (URec k Float p) x #

to :: Rep (URec k Float p) x -> URec k Float p #

Generic (URec k Int p) 

Associated Types

type Rep (URec k Int p) :: * -> * #

Methods

from :: URec k Int p -> Rep (URec k Int p) x #

to :: Rep (URec k Int p) x -> URec k Int p #

Generic (URec k Word p) 

Associated Types

type Rep (URec k Word p) :: * -> * #

Methods

from :: URec k Word p -> Rep (URec k Word p) x #

to :: Rep (URec k Word p) x -> URec k Word p #

Generic (a, b, c) 

Associated Types

type Rep (a, b, c) :: * -> * #

Methods

from :: (a, b, c) -> Rep (a, b, c) x #

to :: Rep (a, b, c) x -> (a, b, c) #

Generic (WrappedArrow a b c) 

Associated Types

type Rep (WrappedArrow a b c) :: * -> * #

Methods

from :: WrappedArrow a b c -> Rep (WrappedArrow a b c) x #

to :: Rep (WrappedArrow a b c) x -> WrappedArrow a b c #

Generic (K1 k i c p) 

Associated Types

type Rep (K1 k i c p) :: * -> * #

Methods

from :: K1 k i c p -> Rep (K1 k i c p) x #

to :: Rep (K1 k i c p) x -> K1 k i c p #

Generic ((:+:) k f g p) 

Associated Types

type Rep ((k :+: f) g p) :: * -> * #

Methods

from :: (k :+: f) g p -> Rep ((k :+: f) g p) x #

to :: Rep ((k :+: f) g p) x -> (k :+: f) g p #

Generic ((:*:) k f g p) 

Associated Types

type Rep ((k :*: f) g p) :: * -> * #

Methods

from :: (k :*: f) g p -> Rep ((k :*: f) g p) x #

to :: Rep ((k :*: f) g p) x -> (k :*: f) g p #

Generic (a, b, c, d) 

Associated Types

type Rep (a, b, c, d) :: * -> * #

Methods

from :: (a, b, c, d) -> Rep (a, b, c, d) x #

to :: Rep (a, b, c, d) x -> (a, b, c, d) #

Generic (M1 k i c f p) 

Associated Types

type Rep (M1 k i c f p) :: * -> * #

Methods

from :: M1 k i c f p -> Rep (M1 k i c f p) x #

to :: Rep (M1 k i c f p) x -> M1 k i c f p #

Generic ((:.:) k2 k1 f g p) 

Associated Types

type Rep ((k2 :.: k1) f g p) :: * -> * #

Methods

from :: (k2 :.: k1) f g p -> Rep ((k2 :.: k1) f g p) x #

to :: Rep ((k2 :.: k1) f g p) x -> (k2 :.: k1) f g p #

Generic (a, b, c, d, e) 

Associated Types

type Rep (a, b, c, d, e) :: * -> * #

Methods

from :: (a, b, c, d, e) -> Rep (a, b, c, d, e) x #

to :: Rep (a, b, c, d, e) x -> (a, b, c, d, e) #

Generic (a, b, c, d, e, f) 

Associated Types

type Rep (a, b, c, d, e, f) :: * -> * #

Methods

from :: (a, b, c, d, e, f) -> Rep (a, b, c, d, e, f) x #

to :: Rep (a, b, c, d, e, f) x -> (a, b, c, d, e, f) #

Generic (a, b, c, d, e, f, g) 

Associated Types

type Rep (a, b, c, d, e, f, g) :: * -> * #

Methods

from :: (a, b, c, d, e, f, g) -> Rep (a, b, c, d, e, f, g) x #

to :: Rep (a, b, c, d, e, f, g) x -> (a, b, c, d, e, f, g) #