Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
Predicates | |
|
Instances
type PredMeaning a Source #
= 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 #
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 (==) ∷ ParamValue → ParamValue → Bool Source # (/=) ∷ ParamValue → ParamValue → Bool Source # | |
Lift DefaultUni ParamValue Source # | |
Defined in Cardano.Constitution.Config.Instance.TxLift lift ∷ ParamValue → RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source # | |
Lift ParamValue Source # | |
Defined in Cardano.Constitution.Config.Types 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 typeRep ∷ Proxy ParamValue → RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source # |
newtype ConstitutionConfig Source #
See Note [Manually constructing a Configuration value]
Instances
FromJSON ConstitutionConfig Source # | |
Defined in Cardano.Constitution.Config.Instance.FromJSON parseJSON ∷ Value → Parser ConstitutionConfig parseJSONList ∷ Value → Parser [ConstitutionConfig] | |
Show ConstitutionConfig Source # | |
Defined in Cardano.Constitution.Config.Types | |
Eq ConstitutionConfig Source # | |
Defined in Cardano.Constitution.Config.Types | |
Lift DefaultUni ConstitutionConfig Source # | |
Defined in Cardano.Constitution.Config.Instance.TxLift lift ∷ ConstitutionConfig → RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source # | |
Lift ConstitutionConfig Source # | |
Defined in Cardano.Constitution.Config.Types lift ∷ Quote m ⇒ ConstitutionConfig → m Exp Source # liftTyped ∷ ∀ (m ∷ Type → Type). Quote m ⇒ ConstitutionConfig → Code m ConstitutionConfig Source # | |
Typeable DefaultUni ConstitutionConfig Source # | |
Defined in Cardano.Constitution.Config.Instance.TxLift typeRep ∷ Proxy ConstitutionConfig → RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source # |