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 a n. 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 a n nInc. 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 a n. KnownSize n => Vector n a -> Int

Get the length of a statically sized vector

#toVector Source

toVector :: forall a n. 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.