feldspar-language-0.4.0.2: A functional embedded language for DSP and parallelism

Feldspar.DSL.Val

Contents

Description

Simple example language built using Lam.

Synopsis

Library

data Val role a Source

Constructors

Val String a 

Instances

ExprShow Val 
Eval Val 
ExprEq Val 
(Num a, Typeable a) => Num (Lam Val () a) 

simpleVal :: Show a => a -> Lam Val () aSource

function :: (Typeable ra, Typeable a) => String -> (a -> b) -> Lam Val ra a -> Lam Val rb bSource

function2 :: (Typeable ra, Typeable a, Typeable rb, Typeable b) => String -> (a -> b -> c) -> Lam Val ra a -> Lam Val rb b -> Lam Val rc cSource

Examples

expr1 :: Lam Val (() -> ()) (Int -> Int)Source

expr2 :: Lam Val (() -> ()) (Int -> Int)Source