Portability | non-portable (TF,GNTD) |
---|---|
Stability | experimental |
Maintainer | hans@hanshoglund.se |
Safe Haskell | None |
Provides time spans.
- data Span
- (<->) :: Time -> Time -> Span
- (>->) :: Time -> Duration -> Span
- era :: (HasOnset a, HasOffset a) => a -> Span
- range :: Iso' Span (Time, Time)
- delta :: Iso' Span (Time, Duration)
- sunit :: Span
- sapp :: (Delayable a, Stretchable a) => Span -> a -> a
- sunder :: (Delayable a, Stretchable a, Delayable b, Stretchable b) => Span -> (a -> b) -> a -> b
- sinvert :: Span -> Span
Documentation
Constructing spans
Deconstructing spans
range :: Iso' Span (Time, Time)Source
View a span as onset and offset.
Typically used with the ViewPatterns
extension, as in
foo (view range -> (u,v)) = ...
delta :: Iso' Span (Time, Duration)Source
View a span as a time and duration.
Typically used with the ViewPatterns
extension, as in
foo (view delta -> (t,d)) = ...
Span as transformation
sapp :: (Delayable a, Stretchable a) => Span -> a -> aSource
Apply a span transformation.
sunder :: (Delayable a, Stretchable a, Delayable b, Stretchable b) => Span -> (a -> b) -> a -> bSource
Apply a function under a span transformation.