{-# LANGUAGE ConstraintKinds            #-}
{-# LANGUAGE DeriveDataTypeable         #-}
{-# LANGUAGE DeriveFoldable             #-}
{-# LANGUAGE DeriveFunctor              #-}
{-# LANGUAGE DeriveTraversable          #-}
{-# LANGUAGE FlexibleContexts           #-}
{-# LANGUAGE FlexibleInstances          #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses      #-}
{-# LANGUAGE NoMonomorphismRestriction  #-}
{-# LANGUAGE RankNTypes                 #-}
{-# LANGUAGE ScopedTypeVariables        #-}
{-# LANGUAGE StandaloneDeriving         #-}
{-# LANGUAGE TupleSections              #-}
{-# LANGUAGE TypeFamilies               #-}
{-# LANGUAGE UndecidableInstances       #-}

-------------------------------------------------------------------------------------
-- |
-- Copyright   : (c) Hans Hoglund 2012-2014
--
-- License     : BSD-style
--
-- Maintainer  : hans@hanshoglund.se
-- Stability   : experimental
-- Portability : non-portable (TF,GNTD)
--
-------------------------------------------------------------------------------------

module Music.Time.Transform (

        module Music.Time.Types,

        -- * The Transformable class
        Transformable(..),
        transformed,

        -- * Specific transformations
        -- ** Transformations
        delaying,
        undelaying,
        stretching,
        compressing,

        -- ** Transforming values
        delay,
        undelay,
        stretch,
        compress,
        (|*),
        (*|),
        (|/),

  ) where

import           Music.Time.Internal.Transform
import           Music.Time.Types

infixl 7 |*
infixr 7 *|
infixr 7 |/

-- | Infix version of 'stretch'.
x |* d = stretch d x
-- | Infix version of 'stretch'.
d *| x = stretch d x
-- | Infix version of 'compress'.
x |/ d = compress d x