Copyright | (c) Hans Hoglund 2012 |
---|---|
License | BSD-style |
Maintainer | hans@hanshoglund.se |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Provides overloaded dynamic literals.
- newtype DynamicsL = DynamicsL {
- getDynamicsL :: (Maybe Double, Maybe Double)
- class IsDynamics a where
- fromDynamics :: DynamicsL -> a
- pppppp :: IsDynamics a => a
- ppppp :: IsDynamics a => a
- pppp :: IsDynamics a => a
- ppp :: IsDynamics a => a
- pp :: IsDynamics a => a
- _p :: IsDynamics a => a
- mp :: IsDynamics a => a
- mf :: IsDynamics a => a
- _f :: IsDynamics a => a
- ff :: IsDynamics a => a
- fff :: IsDynamics a => a
- ffff :: IsDynamics a => a
- fffff :: IsDynamics a => a
- ffffff :: IsDynamics a => a
- sffz :: IsDynamics a => a
- sfz :: IsDynamics a => a
- fz :: IsDynamics a => a
- rfz :: IsDynamics a => a
- fp :: IsDynamics a => a
IsDynamics class
Dynamics literal.
First value is start value, second is end value.
(Just x, Nothing)
is a constant dynamic ofx
(Just x, Just y)
is a dynamic varying fromx
toy
(Nothing, Just y)
is a dynamic varying from the previous level toy
(Nothing, Nothing)
is a dynamic varying from the previous level to the next.
For levels, we use -0.5
for mp, 0.5
for mf and add or remove one for each level.
0
is an unspecified middle level dynamic.
class IsDynamics a where Source
fromDynamics :: DynamicsL -> a Source
IsDynamics Double | |
IsDynamics Float | |
IsDynamics DynamicsL | |
IsDynamics a => IsDynamics [a] | |
Integral a => IsDynamics (Ratio a) | |
HasResolution a => IsDynamics (Fixed a) | |
IsDynamics a => IsDynamics (Maybe a) | |
(Monoid b, IsDynamics a) => IsDynamics (b, a) |
Literal values
Standard dynamics
pppppp :: IsDynamics a => a Source
ppppp :: IsDynamics a => a Source
pppp :: IsDynamics a => a Source
ppp :: IsDynamics a => a Source
pp :: IsDynamics a => a Source
_p :: IsDynamics a => a Source
mp :: IsDynamics a => a Source
mf :: IsDynamics a => a Source
_f :: IsDynamics a => a Source
ff :: IsDynamics a => a Source
fff :: IsDynamics a => a Source
ffff :: IsDynamics a => a Source
fffff :: IsDynamics a => a Source
ffffff :: IsDynamics a => a Source
Other dynamics
sffz :: IsDynamics a => a Source
sfz :: IsDynamics a => a Source
fz :: IsDynamics a => a Source
rfz :: IsDynamics a => a Source
fp :: IsDynamics a => a Source