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

Feldspar.Core.Types

Contents

Synopsis

Heterogenous lists

data a :> b

Heterogeneous list

Constructors

a :> b 

Instances

(Eq a, Eq b) => Eq (:> a b) 
(Ord a, Ord b) => Ord (:> a b) 
(Show a, Show b) => Show (:> a b) 
(Set a, Set b) => Set (:> a b) 

Integers

class Signed a

The set of signed integer types

Type/data representation

data TypeRep

Representation of types

class (Eq a, Show a, Typeable a, Eq (Size a), Show (Size a), Set (Size a)) => Type a where

Associated Types

type Size a

Methods

dataRep :: a -> DataRep

typeRep :: Tagged a (Size a) -> TypeRep

Gives the type representation of a storable value.

sizeOf :: a -> Size a

Gives the size of a storable value.

Instances

Type Bool 
Type Float 
Type Int8 
Type Int16 
Type Int32 
Type Word8 
Type Word16 
Type Word32 
Type () 
Type DefaultInt 
Type DefaultWord 
Type a => Type [a] 
(Type a, RealFloat a) => Type (Complex a) 
(Type a, Type b) => Type (a, b) 
(Type a, Type b, Type c) => Type (a, b, c) 
(Type a, Type b, Type c, Type d) => Type (a, b, c, d) 

class MetaType role a where

Methods

listTypes :: [Int] -> Proxy role -> Proxy a -> [([Int], TypeRep)]

Instances

Type a => MetaType () a 
(MetaType ra a, MetaType rb b) => MetaType (ra, rb) (a, b) 
(MetaType ra a, MetaType rb b, MetaType rc c) => MetaType (ra, rb, rc) (a, b, c) 
(MetaType ra a, MetaType rb b, MetaType rc c, MetaType rd d) => MetaType (ra, rb, rc, rd) (a, b, c, d) 

typeRep' :: forall a. Type a => a -> TypeRep

A version of typeRep that gets the Size implicitly from the argument.

isNil :: Type a => a -> Bool

Size propagation

class FullProp a where

Methods

fullProp :: a

Size propagation function that maps any number of arguments to universal.

Instances

FullProp () 
BoundedInt a => FullProp (Range a) 
FullProp b => FullProp (a -> b)