ContingentClaims.Core.Claim¶
Functions¶
- give
: Claim t x a o -> Claim t x a o
Constructs a claim that reverses the obligations of the bearer and their counterparty.
- and
: Claim t x a o -> Claim t x a o -> Claim t x a o
Used to additively combine two claims together. In order to use this, you must import this module qualified or hide the
and
operator fromPrelude
.
- or
: Electable t x a o -> Electable t x a o -> Claim t x a o
Gives the bearer the right to choose between the input claims. In order to use this, you must import this module qualified or hide the
or
operator fromPrelude
.
- andList
: [Claim t x a o] -> Claim t x a o
Used to additively combine a list of claims together. It is equivalent to applying the
and
builder recursively.
- orList
: [Electable t x a o] -> Claim t x a o
Gives the bearer the right to choose between the input claims. It is equivalent to applying the
or
builder recursively.
- cond
: Inequality t x o -> Claim t x a o -> Claim t x a o -> Claim t x a o
Gives the bearer the right to the first claim if predicate is true, else the second claim.
- scale
: Observation t x o -> Claim t x a o -> Claim t x a o
Multiplies the input claim by a scaling factor (which can be non-deterministic).
- when
: Inequality t x o -> Claim t x a o -> Claim t x a o
Acquires the input claim on the first instant that
predicate
is true.
- anytime
: Inequality t x o -> Text -> Claim t x a o -> Claim t x a o
Gives the bearer the right to enter a claim at any time
predicate
is true.
- until
: Inequality t x o -> Claim t x a o -> Claim t x a o
Expires the input claim on the first instant that
predicate
is true.
- mapParams
: (t -> i) -> (i -> t) -> (a -> a’) -> (o -> o’) -> (x -> x’) -> Claim i x a o -> Claim t x’ a’ o’
Replaces parameters in a claims using the input mapping functions. This can be used to e.g. map the time parameter in a claim from
Date
toTime
, or to map the asset type parameter from an abstractText
to a concreteInstrumentKey
.
- at
: t -> Inequality t x o
Given
t
, constructs a predicate that isTrue
for time ≥t
,False
otherwise.
- upTo
: t -> Inequality t x a
Given
t
, constructs a predicate that isTrue
for time ≤t
,False
otherwise.
- (<=)
: Observation t x o -> Observation t x o -> Inequality t x o
Given observations
o1
ando2
, constructs the predicateo1 ≤ o2
. In order to use this, you must import this module qualified or hide the(<=)
operator fromPrelude
.