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

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 () a

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

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

Examples

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

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