synthesizer-llvm-0.5.0.1: 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) 
(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

($&) :: 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

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