tcalculus-1.0.0: A DSL prototype for structured realtime/reactive functional programing

Copyright(c) David Janin, 2016
Licensesee the LICENSE file in the distribution
Maintainerjanin@labri.fr
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Reactive.Duration

Description

There is another choice (see module bundles Duration)

Synopsis

Documentation

data Duration d i Source #

Instances

Ord iv => Tilable (Beat iv) (Music iv a) Source # 

Methods

duration :: Music iv a -> Beat iv Source #

stretch :: Beat iv -> Music iv a -> Music iv a Source #

(Num d, Ord d, Ord i) => Eq (Duration d i) Source # 

Methods

(==) :: Duration d i -> Duration d i -> Bool #

(/=) :: Duration d i -> Duration d i -> Bool #

(Fractional d, Ord d, Ord i) => Fractional (Duration d i) Source # 

Methods

(/) :: Duration d i -> Duration d i -> Duration d i #

recip :: Duration d i -> Duration d i #

fromRational :: Rational -> Duration d i #

(Num d, Ord d, Ord i) => Num (Duration d i) Source # 

Methods

(+) :: Duration d i -> Duration d i -> Duration d i #

(-) :: Duration d i -> Duration d i -> Duration d i #

(*) :: Duration d i -> Duration d i -> Duration d i #

negate :: Duration d i -> Duration d i #

abs :: Duration d i -> Duration d i #

signum :: Duration d i -> Duration d i #

fromInteger :: Integer -> Duration d i #

(Num d, Ord d, Ord i) => Ord (Duration d i) Source # 

Methods

compare :: Duration d i -> Duration d i -> Ordering #

(<) :: Duration d i -> Duration d i -> Bool #

(<=) :: Duration d i -> Duration d i -> Bool #

(>) :: Duration d i -> Duration d i -> Bool #

(>=) :: Duration d i -> Duration d i -> Bool #

max :: Duration d i -> Duration d i -> Duration d i #

min :: Duration d i -> Duration d i -> Duration d i #

(Show d, Show i) => Show (Duration d i) Source # 

Methods

showsPrec :: Int -> Duration d i -> ShowS #

show :: Duration d i -> String #

showList :: [Duration d i] -> ShowS #

(Num d, Ord d, Ord i) => POrd (Duration d i) Source # 
(Num d, Ord d, Ord i) => Lattice (Duration d i) Source # 

Methods

meet :: [Duration d i] -> Duration d i Source #

join :: [Duration d i] -> Duration d i Source #

compl :: Duration d i -> Duration d i Source #

top :: Duration d i Source #

bot :: Duration d i Source #

updateOnDelay :: (Num d, Ord d, Ord i) => d -> Duration d i -> Duration d i Source #

Replaces every unknown X by X+d where d is a constant duration.

updateOnVariable :: (Num d, Ord d, Ord i) => [i] -> Duration d i -> Duration d i Source #

Replaces every (index) specified unknown X by 0.

durationFromID :: Num d => i -> Duration d i Source #

Creates an unknown duration from a variable index.

durationFromConst :: Num d => d -> Duration d i Source #

Creates an constant duration from a constant value.

isZeroDuration :: (Num d, POrd d) => d -> Bool Source #

True if duration equals zero, false otherwise

maybeConstDur :: (Num d, Ord d, Ord i) => Duration d i -> Maybe d Source #

Tries to convert a duration into a constant value. Return Nothing when the duration is not constant.

toConstDur :: (Num d, Ord d, Ord i) => Duration d i -> d Source #

Converts a duration into a constant value. Makes an error when the duration is not constant.

constDur :: d -> MinMaxAffine d i Source #

Creates a duration from a duration constant d