| Safe Haskell | None |
|---|
Data.Object.Dynamic.Types
- newtype Object u = Object {}
- newtype Table = Table {}
- class Objective o where
- class (Objective o, Typeable memb, Typeable (ValType o memb)) => Member o memb where
- type ValType o memb :: *
- type MemberLens o memb = Member o memb => Simple Traversal o (ValType o memb)
- memberLensDef :: Member o memb => memb -> (o -> Maybe (ValType o memb)) -> MemberLens o memb
- memberLens :: Member o memb => memb -> MemberLens o memb
- insert :: (Objective o, Member o memb, ValType o memb ~ val, Typeable memb, Typeable val) => memb -> val -> o -> o
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 Source
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.
Instances
| (Typeable Autograph, Typeable (ValType o Autograph), Objective o, UseString o) => Member o Autograph | |
| (Typeable KineticEnergy, Typeable (ValType o KineticEnergy), Objective o, UseReal o) => Member o KineticEnergy | |
| (Typeable Momentum, Typeable (ValType o Momentum), Objective o, UseReal o) => Member o Momentum | |
| (Typeable Velocity, Typeable (ValType o Velocity), Objective o, UseReal o) => Member o Velocity | |
| (Typeable Mass, Typeable (ValType o Mass), Objective o, UseReal o) => Member o Mass |
Arguments
| :: Member o memb | |
| => memb | member label |
| -> (o -> Maybe (ValType o memb)) | default value, in case the member is not in the map |
| -> MemberLens o memb | generated lens |
A utility function for creating a MemberLens .
memberLens :: Member o memb => memb -> MemberLens o membSource
create a MemberLens without any default values.