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

Safe Haskell | None

Feldspar.Core.Frontend.MutableArray

# Documentation

newArr :: Type a => Data Length -> Data a -> M (Data (MArr a))

newArr_ :: Type a => Data Length -> M (Data (MArr a))

newListArr :: Type a => [Data a] -> M (Data (MArr a))

getArr :: Type a => Data (MArr a) -> Data Index -> M (Data a)

setArr :: Type a => Data (MArr a) -> Data Index -> Data a -> M ()

modifyArr :: Type a => Data (MArr a) -> Data Index -> (Data a -> Data a) -> M ()

arrLength :: Type a => Data (MArr a) -> M (Data Length)

mapArray :: Type a => (Data a -> Data a) -> Data (MArr a) -> M (Data (MArr a))

forArr :: Syntax a => Data Length -> (Data Index -> M a) -> M ()

swap :: Syntax a => Data (MArr (Internal a)) -> Data Index -> Data Index -> M ()