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

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

Tile.Atom

Contents

Description

An embedding of an arbitrary type into a the type of temporal values of that type

Synopsis

temporal values

data Atom d iv v Source #

Constructors

Atom d v 

Instances

(Eq d, POrd v) => POrd [Atom d iv v] Source # 

Methods

partialCompare :: [Atom d iv v] -> [Atom d iv v] -> Maybe Ordering Source #

pLeq :: [Atom d iv v] -> [Atom d iv v] -> Bool Source #

pOrdEq :: [Atom d iv v] -> [Atom d iv v] -> Bool Source #

pOrdMin :: [[Atom d iv v]] -> Maybe [Atom d iv v] Source #

pOrdMax :: [[Atom d iv v]] -> Maybe [Atom d iv v] Source #

pOrdReduceMin :: [[Atom d iv v]] -> [[Atom d iv v]] Source #

pOrdReduceMax :: [[Atom d iv v]] -> [[Atom d iv v]] Source #

(Eq d, Eq v) => Eq (Atom d iv v) Source # 

Methods

(==) :: Atom d iv v -> Atom d iv v -> Bool #

(/=) :: Atom d iv v -> Atom d iv v -> Bool #

(Show d, Show v) => Show (Atom d iv v) Source # 

Methods

showsPrec :: Int -> Atom d iv v -> ShowS #

show :: Atom d iv v -> String #

showList :: [Atom d iv v] -> ShowS #

(Eq d, POrd v) => POrd (Atom d iv v) Source #

Derived natural partial order.

Methods

partialCompare :: Atom d iv v -> Atom d iv v -> Maybe Ordering Source #

pLeq :: Atom d iv v -> Atom d iv v -> Bool Source #

pOrdEq :: Atom d iv v -> Atom d iv v -> Bool Source #

pOrdMin :: [Atom d iv v] -> Maybe (Atom d iv v) Source #

pOrdMax :: [Atom d iv v] -> Maybe (Atom d iv v) Source #

pOrdReduceMin :: [Atom d iv v] -> [Atom d iv v] Source #

pOrdReduceMax :: [Atom d iv v] -> [Atom d iv v] Source #

Updatable (Atom d iv v) d iv Source #

On-the fly updates of atoms

Methods

update :: UpdateData d iv -> Atom d iv v -> Atom d iv v Source #

Setters

fromValueA :: Tilable d v => v -> Atom d iv v Source #

Builds an atom from a value (with default duration 1)

setDurA :: d -> Atom t t1 v -> Atom d iv v Source #

Sets the duration of the atoms to the specified duration

stretchA :: Num d => d -> Atom d iv v -> Atom d iv v Source #

Stretches the atom by a given factor

Getters

getValueA :: Atom d iv v -> v Source #

Gets the value of an atom

getDurA :: Atom d iv v -> d Source #

Gets the duration of an atom

getAllA :: Atom d iv v -> (d, v) Source #

Gets both the duration and the value of an atom

Functor like functions

fmapA :: (v1 -> v2) -> Atom d iv v1 -> Atom d iv v2 Source #

Changing value

fmapDA :: (d1 -> d2) -> Atom d1 iv v -> Atom d2 iv v Source #

Changing duration