Module Prelude.PreludeArrays

Support for Java reflective arrays.

Imports

Table of Content

Definitions

type ArrayOf s a = Mutable s (JArray a)

short hand for Mutable s (JArray a)

data JArray a = native java.lang.Object

The type JArray X corresponds to Java's J[] for any type X where J is the corresponding java type of X, but note that Java does not really have generic arrays.

We can use arrays of non-primitive types generically inside Frege, but native code that expects or returns arrays will not be generic.

The native interface will take every occurrence of

 JArray X

or

 Mutable s (JArray X)

in native declarations to denote the corresponding Java array type. But when the type argument is variable, it will be just Object. This corresponds to the usage in the array reflection API.

Multi-dimensional arrays are not very well supported out of the box. If one needs more than 1 dimensions, the type will get quite complex, as of course arrays are mutable and so one will have multiple levels of JArray nested in Mutable nested in JArray and so forth. Moreover, multi-dimensional arrays cannot be generic at all.

Note that there are really two different APIs:

  1. With the JArray.getElemAt, JArray.getAt, JArray.setAt, JArray.setElemAt, JArray.itemAt and JArray.elemAt it is possible to work on Java objects with java compile time type X[] for some (non primitive!) java type X.
  2. With the ArrayElement.newArray, ArrayElement.getElemAt, ArrayElement.getAt, ArrayElement.setAt, ArrayElement.setElemAt, ArrayElement.itemAt and ArrayElement.elemAt functions of the ArrayElement class for some type F that is an instance of ArrayElement, we can work on Java objects with Java compile time type X[], where X is the Java type corresponding to F, but the run time type is always X[].

The former ones are usable only in polymorphic functions where the type argument for JArray is a variable and we don't (want to) have ArrayElement constraints. They are not good for interfacing native methods that take or return arrays of a certain type. Run time type errors are possible because native methods could put anything there. However, when used in Frege only, the typing is safe.

The latter ones are truly type safe, because their Frege type corresponds to the expected Java compile time type, which is also the actual run time type.

Here is a cheat sheet for the different array get and set methods:

             Array type            Argument/    Description
                                   Result
 setAt       Mutable (JArray s X)  Maybe X     set null or data element
 setElemAt   Mutable (JArray s X)  X           set data element
 getAt       Mutable (JArray s X)  Maybe X     get null or data element
 getElemAt   Mutable (JArray s X)  X           get data element (unsafe)
 itemAt      JArray s X            Maybe X     get null or data element (pure)
 elemAt      JArray s X            X           get data element (pure, unsafe)

"unsafe" in this context applies only to non-primitive types and means that the function will fail with a NullPointerException if the value accessed is a Java null.

Member Functions

genericElemAt ∷ JArray a → Int → a
pure native PreludeArrays.aGet

Like JArray.genericItemAt but the result is not wrapped in Maybe.

The user is expected to prove that the element cannot be null or else risk a NullPointerException.

Can not be used with arrays of primitive values.

genericFold ∷ ArrayElement α ⇒ (β → α → β) → β → ArrayOf γ α → ST γ β

Equivalent of fold for mutable arrays.

Can not be used with arrays of primitive values.

genericFromIndexList ∷ JavaType α ⇒ [(Int, α)] → STMutable β (JArray α)

Create a mutable array from a finite index/value list.

Indexes not mentioned in the list remain null for non primitive array elements and 0 otherwise.

Can not be used with arrays of primitive values.

genericFromList ∷ ArrayElement α ⇒ [α] → STMutable β (JArray α)

Create a mutable array from a finite list.

Can not be used with arrays of primitive values.

genericGetAt ∷ ArrayOf s a → Int → ST s (Maybe a)
native PreludeArrays.aGet

Get the array element at a certain index of a mutable array and return it in the ST monad.

This will throw an IndexOutOfBoundsException if the index is lower than 0 or greater or equal to the length of the array.

Because in general, array elements may be null, the return value is wrapped in Maybe, as usual.

Can not be used with arrays of primitive values.

genericGetElemAt ∷ ArrayOf s a → Int → ST s a
native PreludeArrays.aGet

Get the array element at a certain index of a mutable array and return it in the ST monad.

This will throw an IndexOutOfBoundsException if the index is lower than 0 or greater or equal to the length of the array.

Unlike with JArray.getAt the element must not be null.

The user is expected to prove that the element cannot be null or else risk a NullPointerException.

Can not be used with arrays of primitive values.

genericItemAt ∷ JArray a → Int → Maybe a
pure native PreludeArrays.aGet

Get the array element at a given index. This will throw an IndexOutOfBoundsException if the index is lower than 0 or greater or equal to the length of the array.

Because in general, array elements may be null, the return value is wrapped in Maybe, as usual.

Can not be used with arrays of primitive values.

genericModify ∷ ArrayElement α ⇒ (α → α) → ArrayOf β α → ST β ()

Modify a mutable array by applying a function to all its elements.

Can not be used with arrays of primitive values.

genericSetAt ∷ ArrayOf s a → Int → Maybe a → ST s ()
native java.lang.reflect.Array.set

Set the element at a certain index of a mutable array to a value that is wrapped in Maybe. This won't work for primitive element types.

This will throw an IndexOutOfBoundsException if the index is lower than 0 or greater or equal to the length of the array.

To set the corresponding array element to null, pass Maybe.Nothing, otherwise pass a Maybe.Just value.

Can not be used with arrays of primitive values.

genericSetElemAt ∷ ArrayOf s a → Int → a → ST s ()
native java.lang.reflect.Array.set

Set the element at a certain index of a mutable array.

This will throw an IndexOutOfBoundsException if the index is lower than 0 or greater or equal to the length of the array.

Can not be used with arrays of primitive values.

getLength ∷ ArrayOf α β → ST α Int

Return the length of a mutable array in the ST monad.

length ∷ JArray a → Int
pure native java.lang.reflect.Array.getLength

Tell the length of an immutable Java array.

Because the length of an array cannot change, it is safe to use this function with Mutable.readonly.

new ∷ Class a → Int → STMutable s (JArray a)
native PreludeArrays.newInstance

create a one dimensional Java array

genericToMaybeList ∷ JArray α → [Maybe α]

Unload an immutable array to a list.

The non-null elements become Maybe.Just values, the nulls translate to Maybe.Nothing

genericArrayFromIndexList ∷ JavaType α ⇒ [(Int, α)] → JArray α

Create an immutable generic array from a finite index/value list.

Uses JArray.genericFromIndexList and freezes the resulting array.

(This is used in the parsers generated with YYGen)

genericArrayFold ∷ (α → β → α) → α → JArray β → α

Left fold an immutable array

class JavaType a ⇒ ArrayElement a

Type class for basic JArray operations. The element type must be an instance of this class to support arrays of that type.

ArrayElement is derivable.

The operations are mostly overloaded on return type and provide the appropriate java.lang.Class object when needed.

This supports one dimensional arrays, though more dimensions would be possible with some extra effort.

Note that JArray cannot be an instance of ArrayElement itself, because it has no fixed java.lang.Class instance.

Known Instances

Int, Char, Bool, Float, Double, Long, StringJ, ->, (,), (,,), Integer, []

Member Functions

arrayFromIndexList ∷ ArrayElement a ⇒ [(Int, a)] → JArray a

Create an immutable JArray from a finite index/value list. See ArrayElement.arrayFromIndexListST

arrayFromIndexListST ∷ ArrayElement a ⇒ [(Int, a)] → STMutable β (JArray a)

Create a mutable array from a finite index/value list.

Indexes not mentioned in the list remain null for non primitive array elements and 0 otherwise.

arrayFromList ∷ ArrayElement a ⇒ [a] → JArray a

Create an immutable array from a finite list whose elements are 'ArrayElement`

Uses JArray.fromList and freezes the resulting array.

arrayFromListST ∷ ArrayElement a ⇒ [a] → STMutable β (JArray a)

Create a mutable array from a finite list.

arrayFromMaybeList ∷ ArrayElement a ⇒ [Maybe a] → JArray a

Create an immutable JArray from a finite list of Maybe values.

arrayFromMaybeListST ∷ ArrayElement a ⇒ [Maybe a] → STMutable β (JArray a)

Create a mutable array from a finite list of Maybe values.

arrayLength ∷ ArrayElement a ⇒ JArray a → Int
pure native .length

The size of an JArray

elemAt ∷ ArrayElement a ⇒ JArray a → Int → a
pure native [i]

Get non-null element at index from immutable array, see JArray.elemAt

getAt ∷ ArrayElement a ⇒ ArrayOf s a → Int → ST s (Maybe a)
native [i]

Get item at index from mutable array, see JArray.getAt

getElemAt ∷ ArrayElement a ⇒ ArrayOf s a → Int → ST s a
native [i]

Get non null item at index from mutable array, see JArray.getElemAt

itemAt ∷ ArrayElement a ⇒ JArray a → Int → Maybe a
pure native [i]

Get item at index from immutable array, see JArray.itemAt

listFromArray ∷ ArrayElement a ⇒ JArray a → [a]

Unload JArray to a list, lazily

maybeListFromArray ∷ ArrayElement a ⇒ JArray a → [Maybe a]

Unload JArray to a maybe list, lazily

modifyAt ∷ ArrayElement a ⇒ (a → a) → ArrayOf s a → Int → ST s ()

Modify item at index in mutable array with result of function application.

modifyElemAt ∷ ArrayElement a ⇒ (a → a) → ArrayOf s a → Int → ST s ()

Modify non null item at index in mutable array with result of function application.

newArray ∷ ArrayElement a ⇒ Int → STMutable s (JArray a)
native new[]

Create a one dimensional array with elements of the instantiated type.

setAt ∷ ArrayElement a ⇒ ArrayOf s a → Int → Maybe a → ST s ()
native []=

Set item or null at index in mutable array, see JArray.setAt

setElemAt ∷ ArrayElement a ⇒ ArrayOf s a → Int → a → ST s ()
native []=

Set item at index in mutable array. see JArray.setElemAt

arrayCacheST ∷ ArrayElement a ⇒ (Int → JArray a → a) → Int → STMutable s (JArray a)

Create a mutable array of a given size and compute the values of its elements by some function. The function gets the current index and the already computed values in the form of an immutable array, where it can access elements with a smaller index than the current one.

The restriction to smaller indexes is because array elements are strict in Frege. For example, we can't store unevaluated values in an String[] array, because the Java type of unevaluated values is not String.

To create an array of 1000 Fibonacci numbers, one could write:

 cache fib 1000 where
   fib 0 _ = 1n
   fib 1 _ = 1n
   fib n a = a.[n-1] + a.[n-2]
arrayCache ∷ ArrayElement a ⇒ (Int → JArray a → a) → Int → JArray a

Memoize a number of results from a function that maps Int to the array element.

Uses ArrayElement.cache and makes it immutable

genericArrayMap ∷ (ArrayElement a, ArrayElement β) ⇒ (a → β) → JArray a → JArray β

Map a function over the elements of an immutable array, and collect the results in another immutable array.

Uses ArrayElement.mapArrayST and makes result read-only.

class (JavaType a, ArrayElement a) ⇒ PrimitiveArrayElement a

Type class for array elements of primitive type.

Not thought for public use, as all instances are pre-defined.

The default implementation of PrimitiveArrayElement.setAt does not support passing Maybe.Nothing, because there can be no null in primitive arrays.

Known Instances

Int, Char, Bool, Float, Double, Long

Member Functions

getAt ∷ PrimitiveArrayElement a ⇒ ArrayOf s a → Int → ST s (Maybe a)

Default implementation suitable for primitive types, wraps result with Maybe.Just

itemAt ∷ PrimitiveArrayElement a ⇒ JArray a → Int → Maybe a

Default implementation suitable for primitive types, wraps result with Maybe.Just

setAt ∷ PrimitiveArrayElement a ⇒ ArrayOf s a → Int → Maybe a → ST s ()

Default implementation suitable for primitive types.

It is an error to put Maybe.Nothing in a primitive array.

Instances

instance ArrayElement (a, b)

Member Functions

arrayFromIndexList ∷ [(Int, (𝖇, 𝖆))] → JArray (𝖇, 𝖆)

inherited from ArrayElement.arrayFromIndexList

arrayFromIndexListST ∷ [(Int, (𝖇, 𝖆))] → STMutable 𝖈 (JArray (𝖇, 𝖆))

inherited from ArrayElement.arrayFromIndexListST

arrayFromList ∷ [(𝖇, 𝖆)] → JArray (𝖇, 𝖆)

inherited from ArrayElement.arrayFromList

arrayFromListST ∷ [(𝖇, 𝖆)] → STMutable 𝖈 (JArray (𝖇, 𝖆))

inherited from ArrayElement.arrayFromListST

arrayFromMaybeList ∷ [Maybe (𝖇, 𝖆)] → JArray (𝖇, 𝖆)

inherited from ArrayElement.arrayFromMaybeList

arrayFromMaybeListST ∷ [Maybe (𝖇, 𝖆)] → STMutable 𝖈 (JArray (𝖇, 𝖆))

inherited from ArrayElement.arrayFromMaybeListST

arrayLength ∷ JArray (𝖇, 𝖆) → Int
pure native .length

inherited from ArrayElement.arrayLength

elemAt ∷ JArray (𝖇, 𝖆) → Int → (𝖇, 𝖆)
pure native [i]

inherited from ArrayElement.elemAt

getAt ∷ ArrayOf 𝖈 (𝖇, 𝖆) → Int → ST 𝖈 (Maybe (𝖇, 𝖆))
native [i]

inherited from ArrayElement.getAt

getElemAt ∷ ArrayOf 𝖈 (𝖇, 𝖆) → Int → ST 𝖈 (𝖇, 𝖆)
native [i]

inherited from ArrayElement.getElemAt

itemAt ∷ JArray (𝖇, 𝖆) → Int → Maybe (𝖇, 𝖆)
pure native [i]

inherited from ArrayElement.itemAt

javaClass ∷ Class (𝖇, 𝖆)
pure native frege.prelude.PreludeBase.TTuple2.class
listFromArray ∷ JArray (𝖇, 𝖆) → [(𝖇, 𝖆)]

inherited from ArrayElement.listFromArray

maybeListFromArray ∷ JArray (𝖇, 𝖆) → [Maybe (𝖇, 𝖆)]

inherited from ArrayElement.maybeListFromArray

modifyAt ∷ ((𝖇, 𝖆) → (𝖇, 𝖆)) → ArrayOf 𝖈 (𝖇, 𝖆) → Int → ST 𝖈 ()

inherited from ArrayElement.modifyAt

modifyElemAt ∷ ((𝖇, 𝖆) → (𝖇, 𝖆)) → ArrayOf 𝖈 (𝖇, 𝖆) → Int → ST 𝖈 ()

inherited from ArrayElement.modifyElemAt

newArray ∷ Int → STMutable 𝖈 (JArray (𝖇, 𝖆))
native new[]

inherited from ArrayElement.newArray

setAt ∷ ArrayOf 𝖈 (𝖇, 𝖆) → Int → Maybe (𝖇, 𝖆) → ST 𝖈 ()
native []=

inherited from ArrayElement.setAt

setElemAt ∷ ArrayOf 𝖈 (𝖇, 𝖆) → Int → (𝖇, 𝖆) → ST 𝖈 ()
native []=

inherited from ArrayElement.setElemAt

instance ArrayElement (a, b, c)

Member Functions

arrayFromIndexList ∷ [(Int, (𝖇, 𝖈, 𝖆))] → JArray (𝖇, 𝖈, 𝖆)

inherited from ArrayElement.arrayFromIndexList

arrayFromIndexListST ∷ [(Int, (𝖇, 𝖈, 𝖆))] → STMutable 𝖉 (JArray (𝖇, 𝖈, 𝖆))

inherited from ArrayElement.arrayFromIndexListST

arrayFromList ∷ [(𝖇, 𝖈, 𝖆)] → JArray (𝖇, 𝖈, 𝖆)

inherited from ArrayElement.arrayFromList

arrayFromListST ∷ [(𝖇, 𝖈, 𝖆)] → STMutable 𝖉 (JArray (𝖇, 𝖈, 𝖆))

inherited from ArrayElement.arrayFromListST

arrayFromMaybeList ∷ [Maybe (𝖇, 𝖈, 𝖆)] → JArray (𝖇, 𝖈, 𝖆)

inherited from ArrayElement.arrayFromMaybeList

arrayFromMaybeListST ∷ [Maybe (𝖇, 𝖈, 𝖆)] → STMutable 𝖉 (JArray (𝖇, 𝖈, 𝖆))

inherited from ArrayElement.arrayFromMaybeListST

arrayLength ∷ JArray (𝖇, 𝖈, 𝖆) → Int
pure native .length

inherited from ArrayElement.arrayLength

elemAt ∷ JArray (𝖇, 𝖈, 𝖆) → Int → (𝖇, 𝖈, 𝖆)
pure native [i]

inherited from ArrayElement.elemAt

getAt ∷ ArrayOf 𝖉 (𝖇, 𝖈, 𝖆) → Int → ST 𝖉 (Maybe (𝖇, 𝖈, 𝖆))
native [i]

inherited from ArrayElement.getAt

getElemAt ∷ ArrayOf 𝖉 (𝖇, 𝖈, 𝖆) → Int → ST 𝖉 (𝖇, 𝖈, 𝖆)
native [i]

inherited from ArrayElement.getElemAt

itemAt ∷ JArray (𝖇, 𝖈, 𝖆) → Int → Maybe (𝖇, 𝖈, 𝖆)
pure native [i]

inherited from ArrayElement.itemAt

javaClass ∷ Class (𝖇, 𝖈, 𝖆)
pure native frege.prelude.PreludeBase.TTuple3.class
listFromArray ∷ JArray (𝖇, 𝖈, 𝖆) → [(𝖇, 𝖈, 𝖆)]

inherited from ArrayElement.listFromArray

maybeListFromArray ∷ JArray (𝖇, 𝖈, 𝖆) → [Maybe (𝖇, 𝖈, 𝖆)]

inherited from ArrayElement.maybeListFromArray

modifyAt ∷ ((𝖇, 𝖈, 𝖆) → (𝖇, 𝖈, 𝖆)) → ArrayOf 𝖉 (𝖇, 𝖈, 𝖆) → Int → ST 𝖉 ()

inherited from ArrayElement.modifyAt

modifyElemAt ∷ ((𝖇, 𝖈, 𝖆) → (𝖇, 𝖈, 𝖆)) → ArrayOf 𝖉 (𝖇, 𝖈, 𝖆) → Int → ST 𝖉 ()

inherited from ArrayElement.modifyElemAt

newArray ∷ Int → STMutable 𝖉 (JArray (𝖇, 𝖈, 𝖆))
native new[]

inherited from ArrayElement.newArray

setAt ∷ ArrayOf 𝖉 (𝖇, 𝖈, 𝖆) → Int → Maybe (𝖇, 𝖈, 𝖆) → ST 𝖉 ()
native []=

inherited from ArrayElement.setAt

setElemAt ∷ ArrayOf 𝖉 (𝖇, 𝖈, 𝖆) → Int → (𝖇, 𝖈, 𝖆) → ST 𝖉 ()
native []=

inherited from ArrayElement.setElemAt

instance ArrayElement (a→b)

Member Functions

arrayFromIndexList ∷ [(Int, 𝖆→𝖇)] → JArray (𝖆→𝖇)

inherited from ArrayElement.arrayFromIndexList

arrayFromIndexListST ∷ [(Int, 𝖆→𝖇)] → STMutable 𝖈 (JArray (𝖆→𝖇))

inherited from ArrayElement.arrayFromIndexListST

arrayFromList ∷ [𝖆→𝖇] → JArray (𝖆→𝖇)

inherited from ArrayElement.arrayFromList

arrayFromListST ∷ [𝖆→𝖇] → STMutable 𝖈 (JArray (𝖆→𝖇))

inherited from ArrayElement.arrayFromListST

arrayFromMaybeList ∷ [Maybe (𝖆→𝖇)] → JArray (𝖆→𝖇)

inherited from ArrayElement.arrayFromMaybeList

arrayFromMaybeListST ∷ [Maybe (𝖆→𝖇)] → STMutable 𝖈 (JArray (𝖆→𝖇))

inherited from ArrayElement.arrayFromMaybeListST

arrayLength ∷ JArray (𝖆→𝖇) → Int
pure native .length

inherited from ArrayElement.arrayLength

elemAt ∷ JArray (𝖆→𝖇) → Int → 𝖆→𝖇
pure native [i]

inherited from ArrayElement.elemAt

getAt ∷ ArrayOf 𝖈 (𝖆→𝖇) → Int → ST 𝖈 (Maybe (𝖆→𝖇))
native [i]

inherited from ArrayElement.getAt

getElemAt ∷ ArrayOf 𝖈 (𝖆→𝖇) → Int → ST 𝖈 (𝖆→𝖇)
native [i]

inherited from ArrayElement.getElemAt

itemAt ∷ JArray (𝖆→𝖇) → Int → Maybe (𝖆→𝖇)
pure native [i]

inherited from ArrayElement.itemAt

javaClass ∷ Class (𝖆→𝖇)
pure native Func.U.class
listFromArray ∷ JArray (𝖆→𝖇) → [𝖆→𝖇]

inherited from ArrayElement.listFromArray

maybeListFromArray ∷ JArray (𝖆→𝖇) → [Maybe (𝖆→𝖇)]

inherited from ArrayElement.maybeListFromArray

modifyAt ∷ ((𝖆→𝖇) → 𝖆→𝖇) → ArrayOf 𝖈 (𝖆→𝖇) → Int → ST 𝖈 ()

inherited from ArrayElement.modifyAt

modifyElemAt ∷ ((𝖆→𝖇) → 𝖆→𝖇) → ArrayOf 𝖈 (𝖆→𝖇) → Int → ST 𝖈 ()

inherited from ArrayElement.modifyElemAt

newArray ∷ Int → STMutable 𝖈 (JArray (𝖆→𝖇))
native new[]

inherited from ArrayElement.newArray

setAt ∷ ArrayOf 𝖈 (𝖆→𝖇) → Int → Maybe (𝖆→𝖇) → ST 𝖈 ()
native []=

inherited from ArrayElement.setAt

setElemAt ∷ ArrayOf 𝖈 (𝖆→𝖇) → Int → (𝖆→𝖇) → ST 𝖈 ()
native []=

inherited from ArrayElement.setElemAt

instance ArrayElement Integer

Member Functions

arrayFromIndexList ∷ [(Int, Integer)] → JArray Integer

inherited from ArrayElement.arrayFromIndexList

arrayFromIndexListST ∷ [(Int, Integer)] → STMutable 𝖆 (JArray Integer)

inherited from ArrayElement.arrayFromIndexListST

arrayFromList ∷ [Integer] → JArray Integer

inherited from ArrayElement.arrayFromList

arrayFromListST ∷ [Integer] → STMutable 𝖆 (JArray Integer)

inherited from ArrayElement.arrayFromListST

arrayFromMaybeList ∷ [Maybe Integer] → JArray Integer

inherited from ArrayElement.arrayFromMaybeList

arrayFromMaybeListST ∷ [Maybe Integer] → STMutable 𝖆 (JArray Integer)

inherited from ArrayElement.arrayFromMaybeListST

arrayLength ∷ JArray Integer → Int
pure native .length

inherited from ArrayElement.arrayLength

elemAt ∷ JArray Integer → Int → Integer
pure native [i]

inherited from ArrayElement.elemAt

getAt ∷ ArrayOf 𝖆 Integer → Int → ST 𝖆 (Maybe Integer)
native [i]

inherited from ArrayElement.getAt

getElemAt ∷ ArrayOf 𝖆 Integer → Int → ST 𝖆 Integer
native [i]

inherited from ArrayElement.getElemAt

itemAt ∷ JArray Integer → Int → Maybe Integer
pure native [i]

inherited from ArrayElement.itemAt

javaClass ∷ Class Integer
pure native java.math.BigInteger.class
listFromArray ∷ JArray Integer → [Integer]

inherited from ArrayElement.listFromArray

maybeListFromArray ∷ JArray Integer → [Maybe Integer]

inherited from ArrayElement.maybeListFromArray

modifyAt ∷ (Integer → Integer) → ArrayOf 𝖆 Integer → Int → ST 𝖆 ()

inherited from ArrayElement.modifyAt

modifyElemAt ∷ (Integer → Integer) → ArrayOf 𝖆 Integer → Int → ST 𝖆 ()

inherited from ArrayElement.modifyElemAt

newArray ∷ Int → STMutable 𝖆 (JArray Integer)
native new[]

inherited from ArrayElement.newArray

setAt ∷ ArrayOf 𝖆 Integer → Int → Maybe Integer → ST 𝖆 ()
native []=

inherited from ArrayElement.setAt

setElemAt ∷ ArrayOf 𝖆 Integer → Int → Integer → ST 𝖆 ()
native []=

inherited from ArrayElement.setElemAt

instance ArrayElement String

Member Functions

arrayFromIndexList ∷ [(Int, String)] → JArray String

inherited from ArrayElement.arrayFromIndexList

arrayFromIndexListST ∷ [(Int, String)] → STMutable 𝖆 (JArray String)

inherited from ArrayElement.arrayFromIndexListST

arrayFromList ∷ [String] → JArray String

inherited from ArrayElement.arrayFromList

arrayFromListST ∷ [String] → STMutable 𝖆 (JArray String)

inherited from ArrayElement.arrayFromListST

arrayFromMaybeList ∷ [Maybe String] → JArray String

inherited from ArrayElement.arrayFromMaybeList

arrayFromMaybeListST ∷ [Maybe String] → STMutable 𝖆 (JArray String)

inherited from ArrayElement.arrayFromMaybeListST

arrayLength ∷ JArray String → Int
pure native .length

inherited from ArrayElement.arrayLength

elemAt ∷ JArray String → Int → String
pure native [i]

inherited from ArrayElement.elemAt

getAt ∷ ArrayOf 𝖆 String → Int → ST 𝖆 (Maybe String)
native [i]

inherited from ArrayElement.getAt

getElemAt ∷ ArrayOf 𝖆 String → Int → ST 𝖆 String
native [i]

inherited from ArrayElement.getElemAt

itemAt ∷ JArray String → Int → Maybe String
pure native [i]

inherited from ArrayElement.itemAt

javaClass ∷ Class String
native java.lang.String.class
listFromArray ∷ JArray String → [String]

inherited from ArrayElement.listFromArray

maybeListFromArray ∷ JArray String → [Maybe String]

inherited from ArrayElement.maybeListFromArray

modifyAt ∷ (String → String) → ArrayOf 𝖆 String → Int → ST 𝖆 ()

inherited from ArrayElement.modifyAt

modifyElemAt ∷ (String → String) → ArrayOf 𝖆 String → Int → ST 𝖆 ()

inherited from ArrayElement.modifyElemAt

newArray ∷ Int → STMutable 𝖆 (JArray String)
native new[]

inherited from ArrayElement.newArray

setAt ∷ ArrayOf 𝖆 String → Int → Maybe String → ST 𝖆 ()
native []=

inherited from ArrayElement.setAt

setElemAt ∷ ArrayOf 𝖆 String → Int → String → ST 𝖆 ()
native []=

inherited from ArrayElement.setElemAt

instance ArrayElement [a]

Member Functions

arrayFromIndexList ∷ [(Int, [𝖆])] → JArray [𝖆]

inherited from ArrayElement.arrayFromIndexList

arrayFromIndexListST ∷ [(Int, [𝖆])] → STMutable 𝖇 (JArray [𝖆])

inherited from ArrayElement.arrayFromIndexListST

arrayFromList ∷ [[𝖆]] → JArray [𝖆]

inherited from ArrayElement.arrayFromList

arrayFromListST ∷ [[𝖆]] → STMutable 𝖇 (JArray [𝖆])

inherited from ArrayElement.arrayFromListST

arrayFromMaybeList ∷ [Maybe [𝖆]] → JArray [𝖆]

inherited from ArrayElement.arrayFromMaybeList

arrayFromMaybeListST ∷ [Maybe [𝖆]] → STMutable 𝖇 (JArray [𝖆])

inherited from ArrayElement.arrayFromMaybeListST

arrayLength ∷ JArray [𝖆] → Int
pure native .length

inherited from ArrayElement.arrayLength

elemAt ∷ JArray [𝖆] → Int → [𝖆]
pure native [i]

inherited from ArrayElement.elemAt

getAt ∷ ArrayOf 𝖇 [𝖆] → Int → ST 𝖇 (Maybe [𝖆])
native [i]

inherited from ArrayElement.getAt

getElemAt ∷ ArrayOf 𝖇 [𝖆] → Int → ST 𝖇 [𝖆]
native [i]

inherited from ArrayElement.getElemAt

itemAt ∷ JArray [𝖆] → Int → Maybe [𝖆]
pure native [i]

inherited from ArrayElement.itemAt

javaClass ∷ Class [𝖆]
pure native frege.prelude.PreludeBase.TList.class
listFromArray ∷ JArray [𝖆] → [[𝖆]]

inherited from ArrayElement.listFromArray

maybeListFromArray ∷ JArray [𝖆] → [Maybe [𝖆]]

inherited from ArrayElement.maybeListFromArray

modifyAt ∷ ([𝖆] → [𝖆]) → ArrayOf 𝖇 [𝖆] → Int → ST 𝖇 ()

inherited from ArrayElement.modifyAt

modifyElemAt ∷ ([𝖆] → [𝖆]) → ArrayOf 𝖇 [𝖆] → Int → ST 𝖇 ()

inherited from ArrayElement.modifyElemAt

newArray ∷ Int → STMutable 𝖇 (JArray [𝖆])
native new[]

inherited from ArrayElement.newArray

setAt ∷ ArrayOf 𝖇 [𝖆] → Int → Maybe [𝖆] → ST 𝖇 ()
native []=

inherited from ArrayElement.setAt

setElemAt ∷ ArrayOf 𝖇 [𝖆] → Int → [𝖆] → ST 𝖇 ()
native []=

inherited from ArrayElement.setElemAt

instance Eq a ⇒ Eq (JArray a)

Member Functions

!= ∷ Eq 𝖆 ⇒ JArray 𝖆 → JArray 𝖆 → Bool
infix  7

inherited from Eq.!=

== ∷ Eq 𝖆 ⇒ JArray 𝖆 → JArray 𝖆 → Bool
infix  7
hashCode ∷ Eq 𝖆 ⇒ JArray 𝖆 → Int
instance JavaType (JArray Int)

Member Functions

javaClass ∷ Class (JArray Int)
native int[].class
instance ListSource JArray

Member Functions

toList ∷ JArray 𝖆 → [𝖆]

Unload an immutable array to a list

The resulting list consists of all the non null elements of the array argument.

This will work for arrays of reference type only!

instance PrimitiveArrayElement Bool

Member Functions

arrayFromIndexList ∷ [(Int, Bool)] → JArray Bool

inherited from ArrayElement.arrayFromIndexList

arrayFromIndexListST ∷ [(Int, Bool)] → STMutable 𝖆 (JArray Bool)

inherited from ArrayElement.arrayFromIndexListST

arrayFromList ∷ [Bool] → JArray Bool

inherited from ArrayElement.arrayFromList

arrayFromListST ∷ [Bool] → STMutable 𝖆 (JArray Bool)

inherited from ArrayElement.arrayFromListST

arrayFromMaybeList ∷ [Maybe Bool] → JArray Bool

inherited from ArrayElement.arrayFromMaybeList

arrayFromMaybeListST ∷ [Maybe Bool] → STMutable 𝖆 (JArray Bool)

inherited from ArrayElement.arrayFromMaybeListST

arrayLength ∷ JArray Bool → Int
pure native .length

inherited from ArrayElement.arrayLength

elemAt ∷ JArray Bool → Int → Bool
pure native [i]

inherited from ArrayElement.elemAt

getAt ∷ ArrayOf 𝖆 Bool → Int → ST 𝖆 (Maybe Bool)

inherited from PrimitiveArrayElement.getAt

getElemAt ∷ ArrayOf 𝖆 Bool → Int → ST 𝖆 Bool
native [i]

inherited from ArrayElement.getElemAt

itemAt ∷ JArray Bool → Int → Maybe Bool

inherited from PrimitiveArrayElement.itemAt

javaClass ∷ Class Bool
native boolean.class
listFromArray ∷ JArray Bool → [Bool]

inherited from ArrayElement.listFromArray

maybeListFromArray ∷ JArray Bool → [Maybe Bool]

inherited from ArrayElement.maybeListFromArray

modifyAt ∷ (Bool → Bool) → ArrayOf 𝖆 Bool → Int → ST 𝖆 ()

inherited from ArrayElement.modifyAt

modifyElemAt ∷ (Bool → Bool) → ArrayOf 𝖆 Bool → Int → ST 𝖆 ()

inherited from ArrayElement.modifyElemAt

newArray ∷ Int → STMutable 𝖆 (JArray Bool)
native new[]

inherited from ArrayElement.newArray

setAt ∷ ArrayOf 𝖆 Bool → Int → Maybe Bool → ST 𝖆 ()

inherited from PrimitiveArrayElement.setAt

setElemAt ∷ ArrayOf 𝖆 Bool → Int → Bool → ST 𝖆 ()
native []=

inherited from ArrayElement.setElemAt

instance PrimitiveArrayElement Char

Member Functions

arrayFromIndexList ∷ [(Int, Char)] → JArray Char

inherited from ArrayElement.arrayFromIndexList

arrayFromIndexListST ∷ [(Int, Char)] → STMutable 𝖆 (JArray Char)

inherited from ArrayElement.arrayFromIndexListST

arrayFromList ∷ [Char] → JArray Char

inherited from ArrayElement.arrayFromList

arrayFromListST ∷ [Char] → STMutable 𝖆 (JArray Char)

inherited from ArrayElement.arrayFromListST

arrayFromMaybeList ∷ [Maybe Char] → JArray Char

inherited from ArrayElement.arrayFromMaybeList

arrayFromMaybeListST ∷ [Maybe Char] → STMutable 𝖆 (JArray Char)

inherited from ArrayElement.arrayFromMaybeListST

arrayLength ∷ JArray Char → Int
pure native .length

inherited from ArrayElement.arrayLength

elemAt ∷ JArray Char → Int → Char
pure native [i]

inherited from ArrayElement.elemAt

getAt ∷ ArrayOf 𝖆 Char → Int → ST 𝖆 (Maybe Char)

inherited from PrimitiveArrayElement.getAt

getElemAt ∷ ArrayOf 𝖆 Char → Int → ST 𝖆 Char
native [i]

inherited from ArrayElement.getElemAt

itemAt ∷ JArray Char → Int → Maybe Char

inherited from PrimitiveArrayElement.itemAt

javaClass ∷ Class Char
native char.class
listFromArray ∷ JArray Char → [Char]

inherited from ArrayElement.listFromArray

maybeListFromArray ∷ JArray Char → [Maybe Char]

inherited from ArrayElement.maybeListFromArray

modifyAt ∷ (Char → Char) → ArrayOf 𝖆 Char → Int → ST 𝖆 ()

inherited from ArrayElement.modifyAt

modifyElemAt ∷ (Char → Char) → ArrayOf 𝖆 Char → Int → ST 𝖆 ()

inherited from ArrayElement.modifyElemAt

newArray ∷ Int → STMutable 𝖆 (JArray Char)
native new[]

inherited from ArrayElement.newArray

setAt ∷ ArrayOf 𝖆 Char → Int → Maybe Char → ST 𝖆 ()

inherited from PrimitiveArrayElement.setAt

setElemAt ∷ ArrayOf 𝖆 Char → Int → Char → ST 𝖆 ()
native []=

inherited from ArrayElement.setElemAt

instance PrimitiveArrayElement Double

Member Functions

arrayFromIndexList ∷ [(Int, Double)] → JArray Double

inherited from ArrayElement.arrayFromIndexList

arrayFromIndexListST ∷ [(Int, Double)] → STMutable 𝖆 (JArray Double)

inherited from ArrayElement.arrayFromIndexListST

arrayFromList ∷ [Double] → JArray Double

inherited from ArrayElement.arrayFromList

arrayFromListST ∷ [Double] → STMutable 𝖆 (JArray Double)

inherited from ArrayElement.arrayFromListST

arrayFromMaybeList ∷ [Maybe Double] → JArray Double

inherited from ArrayElement.arrayFromMaybeList

arrayFromMaybeListST ∷ [Maybe Double] → STMutable 𝖆 (JArray Double)

inherited from ArrayElement.arrayFromMaybeListST

arrayLength ∷ JArray Double → Int
pure native .length

inherited from ArrayElement.arrayLength

elemAt ∷ JArray Double → Int → Double
pure native [i]

inherited from ArrayElement.elemAt

getAt ∷ ArrayOf 𝖆 Double → Int → ST 𝖆 (Maybe Double)

inherited from PrimitiveArrayElement.getAt

getElemAt ∷ ArrayOf 𝖆 Double → Int → ST 𝖆 Double
native [i]

inherited from ArrayElement.getElemAt

itemAt ∷ JArray Double → Int → Maybe Double

inherited from PrimitiveArrayElement.itemAt

javaClass ∷ Class Double
native double.class
listFromArray ∷ JArray Double → [Double]

inherited from ArrayElement.listFromArray

maybeListFromArray ∷ JArray Double → [Maybe Double]

inherited from ArrayElement.maybeListFromArray

modifyAt ∷ (Double → Double) → ArrayOf 𝖆 Double → Int → ST 𝖆 ()

inherited from ArrayElement.modifyAt

modifyElemAt ∷ (Double → Double) → ArrayOf 𝖆 Double → Int → ST 𝖆 ()

inherited from ArrayElement.modifyElemAt

newArray ∷ Int → STMutable 𝖆 (JArray Double)
native new[]

inherited from ArrayElement.newArray

setAt ∷ ArrayOf 𝖆 Double → Int → Maybe Double → ST 𝖆 ()

inherited from PrimitiveArrayElement.setAt

setElemAt ∷ ArrayOf 𝖆 Double → Int → Double → ST 𝖆 ()
native []=

inherited from ArrayElement.setElemAt

instance PrimitiveArrayElement Float

Member Functions

arrayFromIndexList ∷ [(Int, Float)] → JArray Float

inherited from ArrayElement.arrayFromIndexList

arrayFromIndexListST ∷ [(Int, Float)] → STMutable 𝖆 (JArray Float)

inherited from ArrayElement.arrayFromIndexListST

arrayFromList ∷ [Float] → JArray Float

inherited from ArrayElement.arrayFromList

arrayFromListST ∷ [Float] → STMutable 𝖆 (JArray Float)

inherited from ArrayElement.arrayFromListST

arrayFromMaybeList ∷ [Maybe Float] → JArray Float

inherited from ArrayElement.arrayFromMaybeList

arrayFromMaybeListST ∷ [Maybe Float] → STMutable 𝖆 (JArray Float)

inherited from ArrayElement.arrayFromMaybeListST

arrayLength ∷ JArray Float → Int
pure native .length

inherited from ArrayElement.arrayLength

elemAt ∷ JArray Float → Int → Float
pure native [i]

inherited from ArrayElement.elemAt

getAt ∷ ArrayOf 𝖆 Float → Int → ST 𝖆 (Maybe Float)

inherited from PrimitiveArrayElement.getAt

getElemAt ∷ ArrayOf 𝖆 Float → Int → ST 𝖆 Float
native [i]

inherited from ArrayElement.getElemAt

itemAt ∷ JArray Float → Int → Maybe Float

inherited from PrimitiveArrayElement.itemAt

javaClass ∷ Class Float
native float.class
listFromArray ∷ JArray Float → [Float]

inherited from ArrayElement.listFromArray

maybeListFromArray ∷ JArray Float → [Maybe Float]

inherited from ArrayElement.maybeListFromArray

modifyAt ∷ (Float → Float) → ArrayOf 𝖆 Float → Int → ST 𝖆 ()

inherited from ArrayElement.modifyAt

modifyElemAt ∷ (Float → Float) → ArrayOf 𝖆 Float → Int → ST 𝖆 ()

inherited from ArrayElement.modifyElemAt

newArray ∷ Int → STMutable 𝖆 (JArray Float)
native new[]

inherited from ArrayElement.newArray

setAt ∷ ArrayOf 𝖆 Float → Int → Maybe Float → ST 𝖆 ()

inherited from PrimitiveArrayElement.setAt

setElemAt ∷ ArrayOf 𝖆 Float → Int → Float → ST 𝖆 ()
native []=

inherited from ArrayElement.setElemAt

instance PrimitiveArrayElement Int

Member Functions

arrayFromIndexList ∷ [(Int, Int)] → JArray Int

inherited from ArrayElement.arrayFromIndexList

arrayFromIndexListST ∷ [(Int, Int)] → STMutable 𝖆 (JArray Int)

inherited from ArrayElement.arrayFromIndexListST

arrayFromList ∷ [Int] → JArray Int

inherited from ArrayElement.arrayFromList

arrayFromListST ∷ [Int] → STMutable 𝖆 (JArray Int)

inherited from ArrayElement.arrayFromListST

arrayFromMaybeList ∷ [Maybe Int] → JArray Int

inherited from ArrayElement.arrayFromMaybeList

arrayFromMaybeListST ∷ [Maybe Int] → STMutable 𝖆 (JArray Int)

inherited from ArrayElement.arrayFromMaybeListST

arrayLength ∷ JArray Int → Int
pure native .length

inherited from ArrayElement.arrayLength

elemAt ∷ JArray Int → Int → Int
pure native [i]

inherited from ArrayElement.elemAt

getAt ∷ ArrayOf 𝖆 Int → Int → ST 𝖆 (Maybe Int)

inherited from PrimitiveArrayElement.getAt

getElemAt ∷ ArrayOf 𝖆 Int → Int → ST 𝖆 Int
native [i]

inherited from ArrayElement.getElemAt

itemAt ∷ JArray Int → Int → Maybe Int

inherited from PrimitiveArrayElement.itemAt

javaClass ∷ Class Int
native int.class
listFromArray ∷ JArray Int → [Int]

inherited from ArrayElement.listFromArray

maybeListFromArray ∷ JArray Int → [Maybe Int]

inherited from ArrayElement.maybeListFromArray

modifyAt ∷ (Int → Int) → ArrayOf 𝖆 Int → Int → ST 𝖆 ()

inherited from ArrayElement.modifyAt

modifyElemAt ∷ (Int → Int) → ArrayOf 𝖆 Int → Int → ST 𝖆 ()

inherited from ArrayElement.modifyElemAt

newArray ∷ Int → STMutable 𝖆 (JArray Int)
native new[]

inherited from ArrayElement.newArray

setAt ∷ ArrayOf 𝖆 Int → Int → Maybe Int → ST 𝖆 ()

inherited from PrimitiveArrayElement.setAt

setElemAt ∷ ArrayOf 𝖆 Int → Int → Int → ST 𝖆 ()
native []=

inherited from ArrayElement.setElemAt

instance PrimitiveArrayElement Long

Member Functions

arrayFromIndexList ∷ [(Int, Long)] → JArray Long

inherited from ArrayElement.arrayFromIndexList

arrayFromIndexListST ∷ [(Int, Long)] → STMutable 𝖆 (JArray Long)

inherited from ArrayElement.arrayFromIndexListST

arrayFromList ∷ [Long] → JArray Long

inherited from ArrayElement.arrayFromList

arrayFromListST ∷ [Long] → STMutable 𝖆 (JArray Long)

inherited from ArrayElement.arrayFromListST

arrayFromMaybeList ∷ [Maybe Long] → JArray Long

inherited from ArrayElement.arrayFromMaybeList

arrayFromMaybeListST ∷ [Maybe Long] → STMutable 𝖆 (JArray Long)

inherited from ArrayElement.arrayFromMaybeListST

arrayLength ∷ JArray Long → Int
pure native .length

inherited from ArrayElement.arrayLength

elemAt ∷ JArray Long → Int → Long
pure native [i]

inherited from ArrayElement.elemAt

getAt ∷ ArrayOf 𝖆 Long → Int → ST 𝖆 (Maybe Long)

inherited from PrimitiveArrayElement.getAt

getElemAt ∷ ArrayOf 𝖆 Long → Int → ST 𝖆 Long
native [i]

inherited from ArrayElement.getElemAt

itemAt ∷ JArray Long → Int → Maybe Long

inherited from PrimitiveArrayElement.itemAt

javaClass ∷ Class Long
native long.class
listFromArray ∷ JArray Long → [Long]

inherited from ArrayElement.listFromArray

maybeListFromArray ∷ JArray Long → [Maybe Long]

inherited from ArrayElement.maybeListFromArray

modifyAt ∷ (Long → Long) → ArrayOf 𝖆 Long → Int → ST 𝖆 ()

inherited from ArrayElement.modifyAt

modifyElemAt ∷ (Long → Long) → ArrayOf 𝖆 Long → Int → ST 𝖆 ()

inherited from ArrayElement.modifyElemAt

newArray ∷ Int → STMutable 𝖆 (JArray Long)
native new[]

inherited from ArrayElement.newArray

setAt ∷ ArrayOf 𝖆 Long → Int → Maybe Long → ST 𝖆 ()

inherited from PrimitiveArrayElement.setAt

setElemAt ∷ ArrayOf 𝖆 Long → Int → Long → ST 𝖆 ()
native []=

inherited from ArrayElement.setElemAt

Functions and Values by Type

JArray String → Int → Maybe String

ArrayElement_String.itemAt

JArray String → Int → String

ArrayElement_String.elemAt

JArray String → [Maybe String]

ArrayElement_String.maybeListFromArray

JArray String → [String]

ArrayElement_String.listFromArray

JArray String → Int

ArrayElement_String.arrayLength

JArray Bool → Int → Maybe Bool

PrimitiveArrayElement_Bool.itemAt

JArray Bool → Int → Bool

PrimitiveArrayElement_Bool.elemAt

JArray Bool → [Maybe Bool]

PrimitiveArrayElement_Bool.maybeListFromArray

JArray Bool → [Bool]

PrimitiveArrayElement_Bool.listFromArray

JArray Bool → Int

PrimitiveArrayElement_Bool.arrayLength

JArray Char → Int → Maybe Char

PrimitiveArrayElement_Char.itemAt

JArray Char → Int → Char

PrimitiveArrayElement_Char.elemAt

JArray Char → [Maybe Char]

PrimitiveArrayElement_Char.maybeListFromArray

JArray Char → [Char]

PrimitiveArrayElement_Char.listFromArray

JArray Char → Int

PrimitiveArrayElement_Char.arrayLength

JArray Double → Int → Maybe Double

PrimitiveArrayElement_Double.itemAt

JArray Double → Int → Double

PrimitiveArrayElement_Double.elemAt

JArray Double → [Maybe Double]

PrimitiveArrayElement_Double.maybeListFromArray

JArray Double → [Double]

PrimitiveArrayElement_Double.listFromArray

JArray Double → Int

PrimitiveArrayElement_Double.arrayLength

JArray Float → Int → Maybe Float

PrimitiveArrayElement_Float.itemAt

JArray Float → Int → Float

PrimitiveArrayElement_Float.elemAt

JArray Float → [Maybe Float]

PrimitiveArrayElement_Float.maybeListFromArray

JArray Float → [Float]

PrimitiveArrayElement_Float.listFromArray

JArray Float → Int

PrimitiveArrayElement_Float.arrayLength

JArray Int → Int → Maybe Int

PrimitiveArrayElement_Int.itemAt

JArray Int → Int → Int

PrimitiveArrayElement_Int.elemAt

JArray Int → [Maybe Int]

PrimitiveArrayElement_Int.maybeListFromArray

JArray Int → [Int]

PrimitiveArrayElement_Int.listFromArray

JArray Int → Int

PrimitiveArrayElement_Int.arrayLength

JArray Integer → Int → Maybe Integer

ArrayElement_Integer.itemAt

JArray Integer → Int → Integer

ArrayElement_Integer.elemAt

JArray Integer → [Maybe Integer]

ArrayElement_Integer.maybeListFromArray

JArray Integer → [Integer]

ArrayElement_Integer.listFromArray

JArray Integer → Int

ArrayElement_Integer.arrayLength

JArray Long → Int → Maybe Long

PrimitiveArrayElement_Long.itemAt

JArray Long → Int → Long

PrimitiveArrayElement_Long.elemAt

JArray Long → [Maybe Long]

PrimitiveArrayElement_Long.maybeListFromArray

JArray Long → [Long]

PrimitiveArrayElement_Long.listFromArray

JArray Long → Int

PrimitiveArrayElement_Long.arrayLength

[(Int, String)] → JArray String

ArrayElement_String.arrayFromIndexList

[(Int, Bool)] → JArray Bool

PrimitiveArrayElement_Bool.arrayFromIndexList

[(Int, Char)] → JArray Char

PrimitiveArrayElement_Char.arrayFromIndexList

[(Int, Double)] → JArray Double

PrimitiveArrayElement_Double.arrayFromIndexList

[(Int, Float)] → JArray Float

PrimitiveArrayElement_Float.arrayFromIndexList

[(Int, Int)] → JArray Int

PrimitiveArrayElement_Int.arrayFromIndexList

[(Int, Integer)] → JArray Integer

ArrayElement_Integer.arrayFromIndexList

[(Int, Long)] → JArray Long

PrimitiveArrayElement_Long.arrayFromIndexList

[Maybe String] → JArray String

ArrayElement_String.arrayFromMaybeList

[Maybe Bool] → JArray Bool

PrimitiveArrayElement_Bool.arrayFromMaybeList

[Maybe Char] → JArray Char

PrimitiveArrayElement_Char.arrayFromMaybeList

[Maybe Double] → JArray Double

PrimitiveArrayElement_Double.arrayFromMaybeList

[Maybe Float] → JArray Float

PrimitiveArrayElement_Float.arrayFromMaybeList

[Maybe Int] → JArray Int

PrimitiveArrayElement_Int.arrayFromMaybeList

[Maybe Integer] → JArray Integer

ArrayElement_Integer.arrayFromMaybeList

[Maybe Long] → JArray Long

PrimitiveArrayElement_Long.arrayFromMaybeList

[String] → JArray String

ArrayElement_String.arrayFromList

[Bool] → JArray Bool

PrimitiveArrayElement_Bool.arrayFromList

[Char] → JArray Char

PrimitiveArrayElement_Char.arrayFromList

[Double] → JArray Double

PrimitiveArrayElement_Double.arrayFromList

[Float] → JArray Float

PrimitiveArrayElement_Float.arrayFromList

[Int] → JArray Int

PrimitiveArrayElement_Int.arrayFromList

[Integer] → JArray Integer

ArrayElement_Integer.arrayFromList

[Long] → JArray Long

PrimitiveArrayElement_Long.arrayFromList

Class (JArray Int)

JavaType_JArray.javaClass

Class String

ArrayElement_String.javaClass

Class Bool

PrimitiveArrayElement_Bool.javaClass

Class Char

PrimitiveArrayElement_Char.javaClass

Class Double

PrimitiveArrayElement_Double.javaClass

Class Float

PrimitiveArrayElement_Float.javaClass

Class Int

PrimitiveArrayElement_Int.javaClass

Class Integer

ArrayElement_Integer.javaClass

Class Long

PrimitiveArrayElement_Long.javaClass

(String → String) → ArrayOf 𝖆 String → Int → ST 𝖆 ()

ArrayElement_String.modifyAt, ArrayElement_String.modifyElemAt

(Bool → Bool) → ArrayOf 𝖆 Bool → Int → ST 𝖆 ()

PrimitiveArrayElement_Bool.modifyAt, PrimitiveArrayElement_Bool.modifyElemAt

(Char → Char) → ArrayOf 𝖆 Char → Int → ST 𝖆 ()

PrimitiveArrayElement_Char.modifyAt, PrimitiveArrayElement_Char.modifyElemAt

(Double → Double) → ArrayOf 𝖆 Double → Int → ST 𝖆 ()

PrimitiveArrayElement_Double.modifyAt, PrimitiveArrayElement_Double.modifyElemAt

(Float → Float) → ArrayOf 𝖆 Float → Int → ST 𝖆 ()

PrimitiveArrayElement_Float.modifyAt, PrimitiveArrayElement_Float.modifyElemAt

(Int → Int) → ArrayOf 𝖆 Int → Int → ST 𝖆 ()

PrimitiveArrayElement_Int.modifyAt, PrimitiveArrayElement_Int.modifyElemAt

(Integer → Integer) → ArrayOf 𝖆 Integer → Int → ST 𝖆 ()

ArrayElement_Integer.modifyAt, ArrayElement_Integer.modifyElemAt

(Long → Long) → ArrayOf 𝖆 Long → Int → ST 𝖆 ()

PrimitiveArrayElement_Long.modifyAt, PrimitiveArrayElement_Long.modifyElemAt

ArrayOf 𝖆 String → Int → Maybe String → ST 𝖆 ()

ArrayElement_String.setAt

ArrayOf 𝖆 String → Int → String → ST 𝖆 ()

ArrayElement_String.setElemAt

ArrayOf 𝖆 String → Int → ST 𝖆 (Maybe String)

ArrayElement_String.getAt

ArrayOf 𝖆 String → Int → ST 𝖆 String

ArrayElement_String.getElemAt

ArrayOf 𝖆 Bool → Int → Maybe Bool → ST 𝖆 ()

PrimitiveArrayElement_Bool.setAt

ArrayOf 𝖆 Bool → Int → Bool → ST 𝖆 ()

PrimitiveArrayElement_Bool.setElemAt

ArrayOf 𝖆 Bool → Int → ST 𝖆 (Maybe Bool)

PrimitiveArrayElement_Bool.getAt

ArrayOf 𝖆 Bool → Int → ST 𝖆 Bool

PrimitiveArrayElement_Bool.getElemAt

ArrayOf 𝖆 Char → Int → Maybe Char → ST 𝖆 ()

PrimitiveArrayElement_Char.setAt

ArrayOf 𝖆 Char → Int → Char → ST 𝖆 ()

PrimitiveArrayElement_Char.setElemAt

ArrayOf 𝖆 Char → Int → ST 𝖆 (Maybe Char)

PrimitiveArrayElement_Char.getAt

ArrayOf 𝖆 Char → Int → ST 𝖆 Char

PrimitiveArrayElement_Char.getElemAt

ArrayOf 𝖆 Double → Int → Maybe Double → ST 𝖆 ()

PrimitiveArrayElement_Double.setAt

ArrayOf 𝖆 Double → Int → Double → ST 𝖆 ()

PrimitiveArrayElement_Double.setElemAt

ArrayOf 𝖆 Double → Int → ST 𝖆 (Maybe Double)

PrimitiveArrayElement_Double.getAt

ArrayOf 𝖆 Double → Int → ST 𝖆 Double

PrimitiveArrayElement_Double.getElemAt

ArrayOf 𝖆 Float → Int → Maybe Float → ST 𝖆 ()

PrimitiveArrayElement_Float.setAt

ArrayOf 𝖆 Float → Int → Float → ST 𝖆 ()

PrimitiveArrayElement_Float.setElemAt

ArrayOf 𝖆 Float → Int → ST 𝖆 (Maybe Float)

PrimitiveArrayElement_Float.getAt

ArrayOf 𝖆 Float → Int → ST 𝖆 Float

PrimitiveArrayElement_Float.getElemAt

ArrayOf 𝖆 Int → Int → Maybe Int → ST 𝖆 ()

PrimitiveArrayElement_Int.setAt

ArrayOf 𝖆 Int → Int → Int → ST 𝖆 ()

PrimitiveArrayElement_Int.setElemAt

ArrayOf 𝖆 Int → Int → ST 𝖆 (Maybe Int)

PrimitiveArrayElement_Int.getAt

ArrayOf 𝖆 Int → Int → ST 𝖆 Int

PrimitiveArrayElement_Int.getElemAt

ArrayOf 𝖆 Integer → Int → Maybe Integer → ST 𝖆 ()

ArrayElement_Integer.setAt

ArrayOf 𝖆 Integer → Int → Integer → ST 𝖆 ()

ArrayElement_Integer.setElemAt

ArrayOf 𝖆 Integer → Int → ST 𝖆 (Maybe Integer)

ArrayElement_Integer.getAt

ArrayOf 𝖆 Integer → Int → ST 𝖆 Integer

ArrayElement_Integer.getElemAt

ArrayOf 𝖆 Long → Int → Maybe Long → ST 𝖆 ()

PrimitiveArrayElement_Long.setAt

ArrayOf 𝖆 Long → Int → Long → ST 𝖆 ()

PrimitiveArrayElement_Long.setElemAt

ArrayOf 𝖆 Long → Int → ST 𝖆 (Maybe Long)

PrimitiveArrayElement_Long.getAt

ArrayOf 𝖆 Long → Int → ST 𝖆 Long

PrimitiveArrayElement_Long.getElemAt

JArray [𝖆] → Int → Maybe [𝖆]

ArrayElement_[].itemAt

JArray [𝖆] → Int → [𝖆]

ArrayElement_[].elemAt

JArray [𝖆] → [Maybe [𝖆]]

ArrayElement_[].maybeListFromArray

JArray [𝖆] → [[𝖆]]

ArrayElement_[].listFromArray

JArray [𝖆] → Int

ArrayElement_[].arrayLength

JArray a → Int → Maybe a

JArray.genericItemAt

JArray a → Int → a

JArray.genericElemAt

JArray a → Int

JArray.length

JArray α → [Maybe α]

genericToMaybeList

JArray 𝖆 → [𝖆]

ListSource_JArray.toList

[(Int, String)] → STMutable 𝖆 (JArray String)

ArrayElement_String.arrayFromIndexListST

[(Int, [𝖆])] → JArray [𝖆]

ArrayElement_[].arrayFromIndexList

[(Int, Bool)] → STMutable 𝖆 (JArray Bool)

PrimitiveArrayElement_Bool.arrayFromIndexListST

[(Int, Char)] → STMutable 𝖆 (JArray Char)

PrimitiveArrayElement_Char.arrayFromIndexListST

[(Int, Double)] → STMutable 𝖆 (JArray Double)

PrimitiveArrayElement_Double.arrayFromIndexListST

[(Int, Float)] → STMutable 𝖆 (JArray Float)

PrimitiveArrayElement_Float.arrayFromIndexListST

[(Int, Int)] → STMutable 𝖆 (JArray Int)

PrimitiveArrayElement_Int.arrayFromIndexListST

[(Int, Integer)] → STMutable 𝖆 (JArray Integer)

ArrayElement_Integer.arrayFromIndexListST

[(Int, Long)] → STMutable 𝖆 (JArray Long)

PrimitiveArrayElement_Long.arrayFromIndexListST

[Maybe String] → STMutable 𝖆 (JArray String)

ArrayElement_String.arrayFromMaybeListST

[Maybe [𝖆]] → JArray [𝖆]

ArrayElement_[].arrayFromMaybeList

[Maybe Bool] → STMutable 𝖆 (JArray Bool)

PrimitiveArrayElement_Bool.arrayFromMaybeListST

[Maybe Char] → STMutable 𝖆 (JArray Char)

PrimitiveArrayElement_Char.arrayFromMaybeListST

[Maybe Double] → STMutable 𝖆 (JArray Double)

PrimitiveArrayElement_Double.arrayFromMaybeListST

[Maybe Float] → STMutable 𝖆 (JArray Float)

PrimitiveArrayElement_Float.arrayFromMaybeListST

[Maybe Int] → STMutable 𝖆 (JArray Int)

PrimitiveArrayElement_Int.arrayFromMaybeListST

[Maybe Integer] → STMutable 𝖆 (JArray Integer)

ArrayElement_Integer.arrayFromMaybeListST

[Maybe Long] → STMutable 𝖆 (JArray Long)

PrimitiveArrayElement_Long.arrayFromMaybeListST

[String] → STMutable 𝖆 (JArray String)

ArrayElement_String.arrayFromListST

[[𝖆]] → JArray [𝖆]

ArrayElement_[].arrayFromList

[Bool] → STMutable 𝖆 (JArray Bool)

PrimitiveArrayElement_Bool.arrayFromListST

[Char] → STMutable 𝖆 (JArray Char)

PrimitiveArrayElement_Char.arrayFromListST

[Double] → STMutable 𝖆 (JArray Double)

PrimitiveArrayElement_Double.arrayFromListST

[Float] → STMutable 𝖆 (JArray Float)

PrimitiveArrayElement_Float.arrayFromListST

[Int] → STMutable 𝖆 (JArray Int)

PrimitiveArrayElement_Int.arrayFromListST

[Integer] → STMutable 𝖆 (JArray Integer)

ArrayElement_Integer.arrayFromListST

[Long] → STMutable 𝖆 (JArray Long)

PrimitiveArrayElement_Long.arrayFromListST

Int → STMutable 𝖆 (JArray String)

ArrayElement_String.newArray

Int → STMutable 𝖆 (JArray Bool)

PrimitiveArrayElement_Bool.newArray

Int → STMutable 𝖆 (JArray Char)

PrimitiveArrayElement_Char.newArray

Int → STMutable 𝖆 (JArray Double)

PrimitiveArrayElement_Double.newArray

Int → STMutable 𝖆 (JArray Float)

PrimitiveArrayElement_Float.newArray

Int → STMutable 𝖆 (JArray Int)

PrimitiveArrayElement_Int.newArray

Int → STMutable 𝖆 (JArray Integer)

ArrayElement_Integer.newArray

Int → STMutable 𝖆 (JArray Long)

PrimitiveArrayElement_Long.newArray

ArrayElement a ⇒ (Int → JArray a → a) → Int → JArray a

arrayCache

ArrayElement a ⇒ JArray a → Int → Maybe a

ArrayElement.itemAt

ArrayElement a ⇒ JArray a → Int → a

ArrayElement.elemAt

ArrayElement a ⇒ JArray a → [Maybe a]

ArrayElement.maybeListFromArray

ArrayElement a ⇒ JArray a → [a]

ArrayElement.listFromArray

ArrayElement a ⇒ JArray a → Int

ArrayElement.arrayLength

ArrayElement a ⇒ [(Int, a)] → JArray a

ArrayElement.arrayFromIndexList

ArrayElement a ⇒ [Maybe a] → JArray a

ArrayElement.arrayFromMaybeList

ArrayElement a ⇒ [a] → JArray a

ArrayElement.arrayFromList

PrimitiveArrayElement a ⇒ JArray a → Int → Maybe a

PrimitiveArrayElement.itemAt

Eq 𝖆 ⇒ JArray 𝖆 → JArray 𝖆 → Bool

Eq_JArray.!=, Eq_JArray.==

Eq 𝖆 ⇒ JArray 𝖆 → Int

Eq_JArray.hashCode

JavaType α ⇒ [(Int, α)] → JArray α

genericArrayFromIndexList

Class [𝖆]

ArrayElement_[].javaClass

([𝖆] → [𝖆]) → ArrayOf 𝖇 [𝖆] → Int → ST 𝖇 ()

ArrayElement_[].modifyAt, ArrayElement_[].modifyElemAt

(α → β → α) → α → JArray β → α

genericArrayFold

ArrayOf s a → Int → Maybe a → ST s ()

JArray.genericSetAt

ArrayOf s a → Int → a → ST s ()

JArray.genericSetElemAt

ArrayOf s a → Int → ST s (Maybe a)

JArray.genericGetAt

ArrayOf s a → Int → ST s a

JArray.genericGetElemAt

ArrayOf α β → ST α Int

JArray.getLength

ArrayOf 𝖇 [𝖆] → Int → Maybe [𝖆] → ST 𝖇 ()

ArrayElement_[].setAt

ArrayOf 𝖇 [𝖆] → Int → [𝖆] → ST 𝖇 ()

ArrayElement_[].setElemAt

ArrayOf 𝖇 [𝖆] → Int → ST 𝖇 (Maybe [𝖆])

ArrayElement_[].getAt

ArrayOf 𝖇 [𝖆] → Int → ST 𝖇 [𝖆]

ArrayElement_[].getElemAt

JArray (𝖇, 𝖆) → Int → (𝖇, 𝖆)

ArrayElement_(,).elemAt

JArray (𝖇, 𝖆) → Int → Maybe (𝖇, 𝖆)

ArrayElement_(,).itemAt

JArray (𝖇, 𝖆) → [(𝖇, 𝖆)]

ArrayElement_(,).listFromArray

JArray (𝖇, 𝖆) → [Maybe (𝖇, 𝖆)]

ArrayElement_(,).maybeListFromArray

JArray (𝖇, 𝖆) → Int

ArrayElement_(,).arrayLength

JArray (𝖆→𝖇) → Int → 𝖆→𝖇

ArrayElement_->.elemAt

JArray (𝖆→𝖇) → Int → Maybe (𝖆→𝖇)

ArrayElement_->.itemAt

JArray (𝖆→𝖇) → [𝖆→𝖇]

ArrayElement_->.listFromArray

JArray (𝖆→𝖇) → [Maybe (𝖆→𝖇)]

ArrayElement_->.maybeListFromArray

JArray (𝖆→𝖇) → Int

ArrayElement_->.arrayLength

Class a → Int → STMutable s (JArray a)

JArray.new

[(Int, (𝖇, 𝖆))] → JArray (𝖇, 𝖆)

ArrayElement_(,).arrayFromIndexList

[(Int, 𝖆→𝖇)] → JArray (𝖆→𝖇)

ArrayElement_->.arrayFromIndexList

[(Int, [𝖆])] → STMutable 𝖇 (JArray [𝖆])

ArrayElement_[].arrayFromIndexListST

[(𝖇, 𝖆)] → JArray (𝖇, 𝖆)

ArrayElement_(,).arrayFromList

[𝖆→𝖇] → JArray (𝖆→𝖇)

ArrayElement_->.arrayFromList

[Maybe (𝖇, 𝖆)] → JArray (𝖇, 𝖆)

ArrayElement_(,).arrayFromMaybeList

[Maybe (𝖆→𝖇)] → JArray (𝖆→𝖇)

ArrayElement_->.arrayFromMaybeList

[Maybe [𝖆]] → STMutable 𝖇 (JArray [𝖆])

ArrayElement_[].arrayFromMaybeListST

[[𝖆]] → STMutable 𝖇 (JArray [𝖆])

ArrayElement_[].arrayFromListST

Int → STMutable 𝖇 (JArray [𝖆])

ArrayElement_[].newArray

ArrayElement a ⇒ (Int → JArray a → a) → Int → STMutable s (JArray a)

arrayCacheST

ArrayElement a ⇒ (a → a) → ArrayOf s a → Int → ST s ()

ArrayElement.modifyElemAt, ArrayElement.modifyAt

ArrayElement a ⇒ ArrayOf s a → Int → Maybe a → ST s ()

ArrayElement.setAt

ArrayElement a ⇒ ArrayOf s a → Int → a → ST s ()

ArrayElement.setElemAt

ArrayElement a ⇒ ArrayOf s a → Int → ST s (Maybe a)

ArrayElement.getAt

ArrayElement a ⇒ ArrayOf s a → Int → ST s a

ArrayElement.getElemAt

ArrayElement a ⇒ [(Int, a)] → STMutable β (JArray a)

ArrayElement.arrayFromIndexListST

ArrayElement a ⇒ [Maybe a] → STMutable β (JArray a)

ArrayElement.arrayFromMaybeListST

ArrayElement a ⇒ [a] → STMutable β (JArray a)

ArrayElement.arrayFromListST

ArrayElement a ⇒ Int → STMutable s (JArray a)

ArrayElement.newArray

(ArrayElement a, ArrayElement β) ⇒ (a → β) → JArray a → JArray β

genericArrayMap

ArrayElement α ⇒ (α → α) → ArrayOf β α → ST β ()

JArray.genericModify

ArrayElement α ⇒ [α] → STMutable β (JArray α)

JArray.genericFromList

PrimitiveArrayElement a ⇒ ArrayOf s a → Int → Maybe a → ST s ()

PrimitiveArrayElement.setAt

PrimitiveArrayElement a ⇒ ArrayOf s a → Int → ST s (Maybe a)

PrimitiveArrayElement.getAt

JavaType α ⇒ [(Int, α)] → STMutable β (JArray α)

JArray.genericFromIndexList

Class (𝖇, 𝖆)

ArrayElement_(,).javaClass

Class (𝖆→𝖇)

ArrayElement_->.javaClass

((𝖇, 𝖆) → (𝖇, 𝖆)) → ArrayOf 𝖈 (𝖇, 𝖆) → Int → ST 𝖈 ()

ArrayElement_(,).modifyAt, ArrayElement_(,).modifyElemAt

((𝖆→𝖇) → 𝖆→𝖇) → ArrayOf 𝖈 (𝖆→𝖇) → Int → ST 𝖈 ()

ArrayElement_->.modifyAt, ArrayElement_->.modifyElemAt

ArrayOf 𝖈 (𝖇, 𝖆) → Int → (𝖇, 𝖆) → ST 𝖈 ()

ArrayElement_(,).setElemAt

ArrayOf 𝖈 (𝖇, 𝖆) → Int → Maybe (𝖇, 𝖆) → ST 𝖈 ()

ArrayElement_(,).setAt

ArrayOf 𝖈 (𝖇, 𝖆) → Int → ST 𝖈 (𝖇, 𝖆)

ArrayElement_(,).getElemAt

ArrayOf 𝖈 (𝖇, 𝖆) → Int → ST 𝖈 (Maybe (𝖇, 𝖆))

ArrayElement_(,).getAt

ArrayOf 𝖈 (𝖆→𝖇) → Int → (𝖆→𝖇) → ST 𝖈 ()

ArrayElement_->.setElemAt

ArrayOf 𝖈 (𝖆→𝖇) → Int → Maybe (𝖆→𝖇) → ST 𝖈 ()

ArrayElement_->.setAt

ArrayOf 𝖈 (𝖆→𝖇) → Int → ST 𝖈 (𝖆→𝖇)

ArrayElement_->.getElemAt

ArrayOf 𝖈 (𝖆→𝖇) → Int → ST 𝖈 (Maybe (𝖆→𝖇))

ArrayElement_->.getAt

JArray (𝖇, 𝖈, 𝖆) → Int → (𝖇, 𝖈, 𝖆)

ArrayElement_(,,).elemAt

JArray (𝖇, 𝖈, 𝖆) → Int → Maybe (𝖇, 𝖈, 𝖆)

ArrayElement_(,,).itemAt

JArray (𝖇, 𝖈, 𝖆) → [(𝖇, 𝖈, 𝖆)]

ArrayElement_(,,).listFromArray

JArray (𝖇, 𝖈, 𝖆) → [Maybe (𝖇, 𝖈, 𝖆)]

ArrayElement_(,,).maybeListFromArray

JArray (𝖇, 𝖈, 𝖆) → Int

ArrayElement_(,,).arrayLength

[(𝖇, 𝖈, 𝖆)] → JArray (𝖇, 𝖈, 𝖆)

ArrayElement_(,,).arrayFromList

[(Int, (𝖇, 𝖈, 𝖆))] → JArray (𝖇, 𝖈, 𝖆)

ArrayElement_(,,).arrayFromIndexList

[(Int, (𝖇, 𝖆))] → STMutable 𝖈 (JArray (𝖇, 𝖆))

ArrayElement_(,).arrayFromIndexListST

[(Int, 𝖆→𝖇)] → STMutable 𝖈 (JArray (𝖆→𝖇))

ArrayElement_->.arrayFromIndexListST

[(𝖇, 𝖆)] → STMutable 𝖈 (JArray (𝖇, 𝖆))

ArrayElement_(,).arrayFromListST

[𝖆→𝖇] → STMutable 𝖈 (JArray (𝖆→𝖇))

ArrayElement_->.arrayFromListST

[Maybe (𝖇, 𝖈, 𝖆)] → JArray (𝖇, 𝖈, 𝖆)

ArrayElement_(,,).arrayFromMaybeList

[Maybe (𝖇, 𝖆)] → STMutable 𝖈 (JArray (𝖇, 𝖆))

ArrayElement_(,).arrayFromMaybeListST

[Maybe (𝖆→𝖇)] → STMutable 𝖈 (JArray (𝖆→𝖇))

ArrayElement_->.arrayFromMaybeListST

Int → STMutable 𝖈 (JArray (𝖇, 𝖆))

ArrayElement_(,).newArray

Int → STMutable 𝖈 (JArray (𝖆→𝖇))

ArrayElement_->.newArray

ArrayElement α ⇒ (β → α → β) → β → ArrayOf γ α → ST γ β

JArray.genericFold

Class (𝖇, 𝖈, 𝖆)

ArrayElement_(,,).javaClass

((𝖇, 𝖈, 𝖆) → (𝖇, 𝖈, 𝖆)) → ArrayOf 𝖉 (𝖇, 𝖈, 𝖆) → Int → ST 𝖉 ()

ArrayElement_(,,).modifyAt, ArrayElement_(,,).modifyElemAt

ArrayOf 𝖉 (𝖇, 𝖈, 𝖆) → Int → (𝖇, 𝖈, 𝖆) → ST 𝖉 ()

ArrayElement_(,,).setElemAt

ArrayOf 𝖉 (𝖇, 𝖈, 𝖆) → Int → Maybe (𝖇, 𝖈, 𝖆) → ST 𝖉 ()

ArrayElement_(,,).setAt

ArrayOf 𝖉 (𝖇, 𝖈, 𝖆) → Int → ST 𝖉 (𝖇, 𝖈, 𝖆)

ArrayElement_(,,).getElemAt

ArrayOf 𝖉 (𝖇, 𝖈, 𝖆) → Int → ST 𝖉 (Maybe (𝖇, 𝖈, 𝖆))

ArrayElement_(,,).getAt

[(𝖇, 𝖈, 𝖆)] → STMutable 𝖉 (JArray (𝖇, 𝖈, 𝖆))

ArrayElement_(,,).arrayFromListST

[(Int, (𝖇, 𝖈, 𝖆))] → STMutable 𝖉 (JArray (𝖇, 𝖈, 𝖆))

ArrayElement_(,,).arrayFromIndexListST

[Maybe (𝖇, 𝖈, 𝖆)] → STMutable 𝖉 (JArray (𝖇, 𝖈, 𝖆))

ArrayElement_(,,).arrayFromMaybeListST

Int → STMutable 𝖉 (JArray (𝖇, 𝖈, 𝖆))

ArrayElement_(,,).newArray

Valid HTML 4.01 Strict