Module

Foreign.Index

Package
foreign
Repository
purerl/purescript-foreign

This module defines a type class for types which act like property indices.

#Index Source

class Index :: Type -> (Type -> Type) -> Constraintclass Index i m | i -> m where

This type class identifies types that act like property indices.

The canonical instances are for Strings and Ints.

Members

Instances

#Indexable Source

class Indexable :: Type -> (Type -> Type) -> Constraintclass Indexable a m | a -> m where

Members

Instances

#readProp Source

readProp :: forall m. Monad m => String -> Foreign -> FT m Foreign

Attempt to read a value from a foreign value property

#readIndex Source

readIndex :: forall m. Monad m => Int -> Foreign -> FT m Foreign

Attempt to read a value from a foreign value at the specified numeric index

#(!) Source

Operator alias for Foreign.Index.ix (left-associative / precedence 9)