| Safe Haskell | None |
|---|
Data.Object.Dynamic.Type
- newtype Object u = Object {}
- newtype Table = Table {}
- type TableMap = Map TypeRep Dynamic
- class Objective o where
- class (Objective o, Typeable memb, Typeable (ValType o memb)) => Member o memb where
- type ValType o memb :: *
- memberLens :: memb -> MemberLens o memb
- memberLookup :: memb -> Acyclic o (ValType o memb)
- type MemberLens o memb = Member o memb => Simple Traversal o (ValType o memb)
- mkMemberLens :: Member o memb => memb -> MemberLens o memb
- mkMemberLookupDef :: Member o memb => memb -> Acyclic o (ValType o memb) -> Acyclic o (ValType o memb)
- mkMemberLookup :: Member o memb => memb -> Acyclic o (ValType o memb)
- insert :: (Objective o, Member o memb, ValType o memb ~ val, Typeable memb, Typeable val) => memb -> val -> o -> o
- type Acyclic o a = RWST o () (Set TypeRep) Maybe a
- its :: Member o memb => memb -> Acyclic o (ValType o memb)
- acyclically :: Member o memb => Acyclic o (ValType o memb) -> memb -> Acyclic o (ValType o memb)
Documentation
The Object type, where u carrying the information of its underlying types.
Instances
| Objective (Object u) | |
| (Typeable (UnderlyingString (Object u)), UseString u) => UseString (Object u) | |
| (Typeable (UnderlyingInteger (Object u)), UseInteger u) => UseInteger (Object u) | |
| (Typeable (UnderlyingReal (Object u)), UseReal u) => UseReal (Object u) |
class (Objective o, Typeable memb, Typeable (ValType o memb)) => Member o memb whereSource
This means that memb is one of the member labels
of o. The ValType of the member depends both on the label
and (the underlying types of) the object.
Methods
memberLens :: memb -> MemberLens o membSource
memberLookup :: memb -> Acyclic o (ValType o memb)Source
Instances
| (Typeable Autograph, Typeable (ValType o Autograph), Objective o, UseString o) => Member o Autograph | |
| (Typeable KineticEnergy, Typeable (ValType o KineticEnergy), Objective o, UseReal o, Fractional (UnderlyingReal o)) => Member o KineticEnergy | |
| (Typeable Momentum, Typeable (ValType o Momentum), Objective o, UseReal o, Fractional (UnderlyingReal o)) => Member o Momentum | |
| (Typeable Velocity, Typeable (ValType o Velocity), Objective o, UseReal o, Fractional (UnderlyingReal o)) => Member o Velocity | |
| (Typeable Mass, Typeable (ValType o Mass), Objective o, UseReal o) => Member o Mass |
Arguments
| :: Member o memb | |
| => memb | member label |
| -> MemberLens o memb | generated lens |
A utility function for defining a MemberLens .
Arguments
| :: Member o memb | |
| => memb | member label |
| -> Acyclic o (ValType o memb) | default accessor when the record is missing |
| -> Acyclic o (ValType o memb) | member accessor |
A utility function for defining a MemberLookup, with a default computation
for the case the member is missing.
Defining a MemberLookup, without default.
insert :: (Objective o, Member o memb, ValType o memb ~ val, Typeable memb, Typeable val) => memb -> val -> o -> oSource
Given a pair of Member label and a value, create the data field
for the member and inserts the value.