Module

Network.Ethereum.Web3.Solidity.Vector

Package
purescript-web3
Repository
f-o-a-m/purescript-web3

#Vector Source

newtype Vector (n :: DigitList) a

Represents a statically sized vector of length n. See module Network.Ethereum.Web3.Solidity.Sizes for some predefined sizes.

Instances

#unVector Source

unVector :: forall n a. Vector n a -> Array a

Access the underlying array

#nilVector Source

nilVector :: forall a. Vector (DOne D0) a

Array of length 0

#vCons Source

vCons :: forall nInc n a. Inc n nInc => a -> Vector n a -> Vector nInc a

Dependently typed cons

#(:<) Source

Operator alias for Network.Ethereum.Web3.Solidity.Vector.vCons (right-associative / precedence 6)

#vectorLength Source

vectorLength :: forall n a. KnownSize n => Vector n a -> Int

Get the length of a statically sized vector

#toVector Source

toVector :: forall n a. KnownSize n => DLProxy n -> Array a -> Maybe (Vector n a)

Attempt to coerce an array into a statically sized array. See module Network.Ethereum.Web3.Solidity.Sizes for some predefined sizes.