| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cardano.Constitution.Config.Types
Contents
Synopsis
- data PredKey
- type Predicate v = (PredKey, [v])
- newtype Predicates v = Predicates {
- unPredicates ∷ [Predicate v]
- type PredMeaning a = Ord a ⇒ a → a → Bool
- type Param = (ParamKey, ParamValue)
- type ParamKey = Integer
- data ParamValue
- newtype ConstitutionConfig = ConstitutionConfig {}
Documentation
The "unresolved" Predicate names, as read from JSON. At runtime, these PredKeys
will each be resolved to actual PredMeaning functions.
Instances
type Predicate v = (PredKey, [v]) Source #
Polymorphic over the values. In reality, the value v is an Tx.Integer or Tx.Rational
newtype Predicates v Source #
newtype so we can overload FromJSON
Constructors
| Predicates | |
Fields
| |
Instances
type PredMeaning a Source #
Arguments
| = Ord a | |
| ⇒ a | the expected value, supplied from the config (json) |
| → a | the proposed value, taken from the ScriptContext |
| → Bool | True means the proposed value meets the expectations. |
The "meaning" of a predicate, resolved from a PredKey (a string in JSON)
to a Tx binary predicate function.
type Param = (ParamKey, ParamValue) Source #
type ParamKey = Integer Source #
Promised to be a stable identifier (stable at least for a whole cardano era)
data ParamValue Source #
Constructors
| ParamInteger (Predicates Integer) | |
| ParamRational (Predicates Rational) | |
| ParamList [ParamValue] | |
| ParamAny |
Instances
| Show ParamValue Source # | |
Defined in Cardano.Constitution.Config.Types | |
| Eq ParamValue Source # | |
Defined in Cardano.Constitution.Config.Types | |
| Lift DefaultUni ParamValue Source # | |
Defined in Cardano.Constitution.Config.Instance.TxLift Methods lift ∷ ParamValue → RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source # | |
| Lift ParamValue Source # | |
Defined in Cardano.Constitution.Config.Types Methods lift ∷ Quote m ⇒ ParamValue → m Exp Source # liftTyped ∷ ∀ (m ∷ Type → Type). Quote m ⇒ ParamValue → Code m ParamValue Source # | |
| Typeable DefaultUni ParamValue Source # | |
Defined in Cardano.Constitution.Config.Instance.TxLift Methods typeRep ∷ Proxy ParamValue → RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source # | |
newtype ConstitutionConfig Source #
See Note [Manually constructing a Configuration value]
Constructors
| ConstitutionConfig | |
Fields | |