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

Safe HaskellSafe-Inferred

Feldspar.Core.Collection

Description

General interfaces to collections of data

Synopsis

Documentation

type family Elem a Source

Collection element type

type family CollIndex a Source

Collection index type

type family CollSize a Source

Collection size type

class Indexed a whereSource

Data structures that support indexing

Methods

(!) :: a -> CollIndex a -> Elem aSource

Instances

Type a => Indexed (Data [a]) 
Syntax a => Indexed (Vector a) 
(Unit w, ~ * (Size w) (Range w)) => Indexed (BitVector w) 
Syntax a => Indexed (Stream a) 
Syntax a => Indexed (Vector sh a) 

class Sized a whereSource

Sized data structures

Methods

collSize :: a -> CollSize aSource

setCollSize :: CollSize a -> a -> aSource

Instances

Type a => Sized (Data [a]) 
Syntax a => Sized (Vector a) 
(Syntax a, Shape sh) => Sized (Vector sh a) 

class CollMap a b whereSource

Mapping over collections

Methods

collMap :: (Elem a -> Elem b) -> a -> bSource

Instances

(Type a, Type b) => CollMap (Data [a]) (Data [b]) 
CollMap (Vector a) (Vector b) 
CollMap (Vector sh a) (Vector sh a)