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
andoperator 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
oroperator 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
andbuilder 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
orbuilder 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
predicateis 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
predicateis 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
predicateis 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
DatetoTime, or to map the asset type parameter from an abstractTextto a concreteInstrumentKey.
- at
: t -> Inequality t x o
Given
t, constructs a predicate that isTruefor time ≥t,Falseotherwise.
- upTo
: t -> Inequality t x a
Given
t, constructs a predicate that isTruefor time ≤t,Falseotherwise.
- (<=)
: Observation t x o -> Observation t x o -> Inequality t x o
Given observations
o1ando2, constructs the predicateo1 ≤ o2. In order to use this, you must import this module qualified or hide the(<=)operator fromPrelude.