Copyright | (c) Hans Hoglund 2012-2014 |
---|---|
License | BSD-style |
Maintainer | hans@hanshoglund.se |
Stability | experimental |
Portability | non-portable (TF,GNTD) |
Safe Haskell | None |
Language | Haskell2010 |
- data Delayed a
- delayed :: Iso (Time, a) (Time, b) (Delayed a) (Delayed b)
- delayedValue :: (Transformable a, Transformable b) => Lens (Delayed a) (Delayed b) a b
Delayed type
Delayed
represents a value with an offset in time.
A delayed value has a known position
, but no duration
.
Placing a value inside Delayed
does not make it invariant under stretch
, as the
offset of a delayed value may be stretched with respect to the origin. However, in
contrast to a note the duration is not stretched.
Construction
delayed :: Iso (Time, a) (Time, b) (Delayed a) (Delayed b) Source
View a delayed value as a pair of a the original value and a delay time.
delayedValue :: (Transformable a, Transformable b) => Lens (Delayed a) (Delayed b) a b Source
View a delayed value as a pair of the original value and the transformation (and vice versa).