java-bridge-0.20130606.3: Bindings to the JNI and a high level interface generator.

Portabilityportable (Haskell2010)
Stabilityprovisional
Maintainerjulian.fleischer@fu-berlin.de
Safe HaskellSafe-Inferred

Foreign.Java.Value

Description

The ternary value type, which can treither hold a value, nothing, or a special value describing an error condition.

Synopsis

Documentation

data Value e a Source

A ternary value type to hold one of two possible value types or none at all.

Constructors

Value a

An actual value

NoValue

No value

Fail e

A value describing the error

valueSource

Arguments

:: b

default value if neither a value nor a fail value is given

-> (e -> b)

function to handle a fail value

-> (a -> b)

function to handle an actual value

-> Value e a

the value

-> b

the final return value

fold on a Value, like either for Either or maybe for Maybe.