synthesizer-llvm-0.8: Efficient signal processing using runtime compilation

Safe HaskellNone

Synthesizer.LLVM.CausalParameterized.Functional

Synopsis

Documentation

data T p inp out Source

Instances

Functor (T p inp) 
Applicative (T p inp) 
(Field b, Real b, RationalConstant b) => Fractional (T p a b) 
(PseudoRing b, Real b, IntegerConstant b) => Num (T p a b) 
(Transcendental b, RationalConstant b) => C (T p a b) 
(Transcendental b, RationalConstant b) => C (T p a b) 
(Field b, RationalConstant b) => C (T p a b) 
(PseudoRing b, IntegerConstant b) => C (T p a b) 
Additive b => C (T p a b) 

lift :: T p inp out -> T p inp outSource

fromSignal :: T p out -> T p inp outSource

($&) :: T p b c -> T p a b -> T p a cSource

(&|&) :: T p a b -> T p a c -> T p a (b, c)Source

compile :: T p inp out -> T p inp outSource

compileSignal :: T p () out -> T p outSource

withArgs :: MakeArguments inp => (Arguments (T p inp) inp -> T p inp out) -> T p inp outSource

Using withArgs you can simplify

 let x = F.lift (arr fst)
     y = F.lift (arr (fst.snd))
     z = F.lift (arr (snd.snd))
 in  F.compile (f x y z)

to

 withArgs $ \(x,(y,z)) -> f x y z

type family Arguments f arg Source

newtype AnyArg a Source

You can use this to explicitly stop breaking of composed data types. It might be more comfortable to do this using withGuidedArgs.

Constructors

AnyArg 

Fields

getAnyArg :: a
 

Instances

data Atom a Source

Constructors

Atom 

Instances

withGuidedArgs :: (MakeGuidedArguments pat, PatternArguments pat ~ inp) => pat -> (GuidedArguments (T p inp) pat -> T p inp out) -> T p inp outSource

This is similar to withArgs but it allows to specify the decomposition depth using a pattern.

type family GuidedArguments f pat Source

type family PatternArguments pat Source

data PrepareArguments f merged separated Source

withPreparedArgs :: PrepareArguments (T p inp) inp a -> (a -> T p inp out) -> T p inp outSource

Alternative to withGuidedArgs. This way of pattern construction is even Haskell 98.

withPreparedArgs2 :: PrepareArguments (T p (inp0, inp1)) inp0 a -> PrepareArguments (T p (inp0, inp1)) inp1 b -> (a -> b -> T p (inp0, inp1) out) -> T p (inp0, inp1) outSource

pairArgs :: Functor f => PrepareArguments f a0 b0 -> PrepareArguments f a1 b1 -> PrepareArguments f (a0, a1) (b0, b1)Source

tripleArgs :: Functor f => PrepareArguments f a0 b0 -> PrepareArguments f a1 b1 -> PrepareArguments f a2 b2 -> PrepareArguments f (a0, a1, a2) (b0, b1, b2)Source