jsaddle-0.9.4.0: Interface for JavaScript that works with GHCJS and GHC

Safe HaskellNone
LanguageHaskell2010

JavaScript.TypedArray.Internal

Synopsis

Documentation

class TypedArray a where Source #

Methods

unsafeIndex :: Int -> a -> JSM (Elem a) Source #

index :: Int -> a -> JSM (Elem a) Source #

unsafeSetIndex :: Int -> Elem a -> a -> JSM () Source #

setIndex :: Int -> Elem a -> a -> JSM () Source #

create :: Int -> JSM a Source #

fromArray :: SomeJSArray m -> JSM a Source #

fromArrayBuffer :: MutableArrayBuffer -> Int -> Maybe Int -> JSM a Source #

indexOf :: Int -> Elem a -> a -> JSM Int Source #

lastIndexOf :: Int -> Elem a -> a -> JSM Int Source #

Instances

TypedArray IOFloat64Array Source # 
TypedArray IOFloat32Array Source # 
TypedArray IOUint8ClampedArray Source # 
TypedArray IOUint32Array Source # 
TypedArray IOUint16Array Source # 
TypedArray IOUint8Array Source # 
TypedArray IOInt32Array Source # 
TypedArray IOInt16Array Source # 
TypedArray IOInt8Array Source # 

length :: SomeTypedArray e m -> GHCJSPure Int Source #

length of the typed array in elements

byteLength :: SomeTypedArray e m -> GHCJSPure Int Source #

length of the array in bytes

byteOffset :: SomeTypedArray e m -> GHCJSPure Int Source #

offset of the array in the buffer

buffer :: SomeTypedArray e m -> GHCJSPure (SomeArrayBuffer m) Source #

the underlying buffer of the array

subarray :: Int -> Int -> SomeTypedArray e m -> GHCJSPure (SomeTypedArray e m) Source #

create a view of the existing array

set :: Int -> SomeTypedArray e m -> SomeTypedArray e1 Mutable -> GHCJSPure () Source #

copy the elements of one typed array to another