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.Tilable

Description

The type class Tilable allows to embed value types with non trivial duration into tiles in a much more efficient and uniform way.

Synopsis

Documentation

class (Eq d, Num d, Lattice d) => Tilable d a where Source #

Class Tilable that group some properties (and default behaviors) we want for values to be in tiles.

The following property should be statisfied: prop> duration (stretch d a) = d*(duration a)

Methods

duration :: a -> d Source #

stretch :: d -> a -> a Source #

Instances

(Eq d, Num d, Lattice d) => Tilable d () Source # 

Methods

duration :: () -> d Source #

stretch :: d -> () -> () Source #

(Eq d, Num d, Lattice d) => Tilable d Char Source # 

Methods

duration :: Char -> d Source #

stretch :: d -> Char -> Char Source #

(Eq d, Num d, Lattice d) => Tilable d Int Source # 

Methods

duration :: Int -> d Source #

stretch :: d -> Int -> Int Source #

(Eq d, Num d, Lattice d) => Tilable d Rational Source # 
(Eq d, Num d, Lattice d) => Tilable d Integer Source # 
(Eq d, Num d, Lattice d) => Tilable d Midi Source #

Midi values are tilable

Methods

duration :: Midi -> d Source #

stretch :: d -> Midi -> Midi Source #

Tilable d a => Tilable d [a] Source # 

Methods

duration :: [a] -> d Source #

stretch :: d -> [a] -> [a] Source #

(Tilable d a, Tilable d b) => Tilable d (a, b) Source # 

Methods

duration :: (a, b) -> d Source #

stretch :: d -> (a, b) -> (a, b) Source #

(Tilable d a, Tilable d b) => Tilable d (Either a b) Source # 

Methods

duration :: Either a b -> d Source #

stretch :: d -> Either a b -> Either a b Source #

(Eq d, Num d, Lattice d) => Tilable d (v1 -> v2) Source #

Functions have default duration +infty (top)

Methods

duration :: (v1 -> v2) -> d Source #

stretch :: d -> (v1 -> v2) -> v1 -> v2 Source #

(Tilable d v, (~) * d1 d) => Tilable d (Tile d1 iv v) Source #

Tile are tilable...

Methods

duration :: Tile d1 iv v -> d Source #

stretch :: d -> Tile d1 iv v -> Tile d1 iv v Source #

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 #