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

Safe Haskell | None

Feldspar.Core.Constructs

Contents

- Domain
- Front end

Synopsis

- type FeldSymbols = (Decor SourceInfo1 Identity :|| Type) :+: ((Condition :|| Type) :+: ((FFI :|| Type) :+: ((Let :|| Type) :+: ((Literal :|| Type) :+: ((Select :|| Type) :+: ((Tuple :|| Type) :+: ((Array :|| Type) :+: ((BITS :|| Type) :+: ((COMPLEX :|| Type) :+: ((Conversion :|| Type) :+: ((EQ :|| Type) :+: ((Error :|| Type) :+: ((FLOATING :|| Type) :+: ((FRACTIONAL :|| Type) :+: ((FUTURE :|| Type) :+: ((INTEGRAL :|| Type) :+: ((Logic :|| Type) :+: ((Loop :|| Type) :+: ((NUM :|| Type) :+: ((NoInline :|| Type) :+: ((ORD :|| Type) :+: ((PropSize :|| Type) :+: ((Save :|| Type) :+: ((Trace :|| Type) :+: (ConditionM Mut :+: (LoopM Mut :+: (MONAD Mut :+: (Mutable :+: (MutableArray :+: (MutableReference :+: (MutableToPure :+: (MONAD Par :+: (ParFeature :+: Empty)))))))))))))))))))))))))))))))))
- type FeldDomain = FODomain FeldSymbols Typeable Type
- type FeldDomainAll = HODomain FeldSymbols Typeable Type
- newtype Data a = Data {
  - unData :: ASTF FeldDomainAll a
  }
- class (Syntactic a, Domain a ~ FeldDomainAll, Type (Internal a)) => Syntax a
- sugarSymF :: (ApplySym sig b dom, SyntacticN c b, InjectC (feature :|| Type) dom (DenResult sig), Type (DenResult sig)) => feature sig -> c

# Domain

type FeldSymbols = (Decor SourceInfo1 Identity :|| Type) :+: ((Condition :|| Type) :+: ((FFI :|| Type) :+: ((Let :|| Type) :+: ((Literal :|| Type) :+: ((Select :|| Type) :+: ((Tuple :|| Type) :+: ((Array :|| Type) :+: ((BITS :|| Type) :+: ((COMPLEX :|| Type) :+: ((Conversion :|| Type) :+: ((EQ :|| Type) :+: ((Error :|| Type) :+: ((FLOATING :|| Type) :+: ((FRACTIONAL :|| Type) :+: ((FUTURE :|| Type) :+: ((INTEGRAL :|| Type) :+: ((Logic :|| Type) :+: ((Loop :|| Type) :+: ((NUM :|| Type) :+: ((NoInline :|| Type) :+: ((ORD :|| Type) :+: ((PropSize :|| Type) :+: ((Save :|| Type) :+: ((Trace :|| Type) :+: (ConditionM Mut :+: (LoopM Mut :+: (MONAD Mut :+: (Mutable :+: (MutableArray :+: (MutableReference :+: (MutableToPure :+: (MONAD Par :+: (ParFeature :+: Empty)))))))))))))))))))))))))))))))))

type FeldDomain = FODomain FeldSymbols Typeable Type

type FeldDomainAll = HODomain FeldSymbols Typeable Type

# Front end

newtype Data a

Constructors

Data |

Fields

unData :: ASTF FeldDomainAll a

Instances

Typeable1 Data |
Type a => Eq (Data a) |
Fraction a => Fractional (Data a) |
Numeric a => Num (Data a) |
Type a => Show (Data a) |
Type a => Annotatable (Data a) |
Testable (Data Bool) |
(Type a, Arbitrary a) => Arbitrary (Data a) |
Type a => Syntactic (Data a) |
Type a => Sized (Data [a]) |
Type a => Indexed (Data [a]) |
Type a => Syntax (Data a) |
Fixable (Data Float) |
Type a => ElemWise (Data a) |
(Type a, Type b) => CollMap (Data [a]) (Data [b]) |
Wrap (Data a) (Data a) | Basic instances to handle `Data a` input and output. Other instances are located in the concerned libraries.
Type a => Wrap (Vector (Data a)) (Data [a]) |
Unit w => Wrap (BitVector w) (Data [w]) |
Type a => Wrap (Matrix a) (Data [[a]]) |
Numeric a => Mul (Data a) (Matrix a) |
Numeric a => Mul (Data a) (Vector1 a) |
Numeric a => Mul (Data a) (Data a) |
Numeric a => Mul (Vector1 a) (Matrix a) |
Numeric a => Mul (Vector1 a) (Vector1 a) |
Numeric a => Mul (Vector1 a) (Data a) |
Numeric a => Mul (Matrix a) (Matrix a) |
Numeric a => Mul (Matrix a) (Vector1 a) |
Numeric a => Mul (Matrix a) (Data a) |
Slice sl => Slice (:. sl (Data Length)) |
Shape sh => Shape (:. sh (Data Length)) |
Wrap t u => Wrap (Data a -> t) (Data a -> u) |
(Wrap t u, Type a, Nat s) => Wrap (Vector1 a -> t) (Data' s [a] -> u) |
(Wrap t u, Type a, Nat row, Nat col) => Wrap (Matrix a -> t) (Data' (row, col) [[a]] -> u) |

class (Syntactic a, Domain a ~ FeldDomainAll, Type (Internal a)) => Syntax a

Specialization of the `Syntactic` class for the Feldspar domain

Instances

Syntax () |
Type a => Syntax (Data a) |
Syntax a => Syntax (Future a) |
Syntax a => Syntax (Ref a) |
Syntax a => Syntax (IVar a) |
Syntax a => Syntax (Vector a) |
Unit a => Syntax (BitVector a) |
Type a => Syntax (Fix a) |
Syntax a => Syntax (Option a) |
Syntax a => Syntax (PushVector a) |
(Syntax a, Syntax b) => Syntax (a, b) |
Type a => Syntax (Data' s a) |
(Shape sh, Syntax a) => Syntax (Vector sh a) |
(Syntax a, Syntax b, Syntax c) => Syntax (a, b, c) |
(Syntax a, Syntax b, Syntax c, Syntax d) => Syntax (a, b, c, d) |
(Syntax a, Syntax b, Syntax c, Syntax d, Syntax e) => Syntax (a, b, c, d, e) |
(Syntax a, Syntax b, Syntax c, Syntax d, Syntax e, Syntax f) => Syntax (a, b, c, d, e, f) |
(Syntax a, Syntax b, Syntax c, Syntax d, Syntax e, Syntax f, Syntax g) => Syntax (a, b, c, d, e, f, g) |

sugarSymF :: (ApplySym sig b dom, SyntacticN c b, InjectC (feature :|| Type) dom (DenResult sig), Type (DenResult sig)) => feature sig -> c