cardano-constitution-1.34.0.0: Cardano's Constitution
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Constitution.Config.Types

Synopsis

Documentation

data PredKey Source #

The "unresolved" Predicate names, as read from JSON. At runtime, these PredKeys will each be resolved to actual PredMeaning functions.

Constructors

MinValue 
MaxValue 
NotEqual 

Instances

Instances details
FromJSON PredKey Source # 
Instance details

Defined in Cardano.Constitution.Config.Instance.FromJSON

Methods

parseJSON ∷ Value → Parser PredKey

parseJSONList ∷ Value → Parser [PredKey]

omittedFieldMaybe PredKey

FromJSONKey PredKey 
Instance details

Defined in Cardano.Constitution.Config.Instance.FromJSON

Methods

fromJSONKey ∷ FromJSONKeyFunction PredKey

fromJSONKeyList ∷ FromJSONKeyFunction [PredKey]

Bounded PredKey Source # 
Instance details

Defined in Cardano.Constitution.Config.Types

Enum PredKey Source # 
Instance details

Defined in Cardano.Constitution.Config.Types

Generic PredKey Source # 
Instance details

Defined in Cardano.Constitution.Config.Types

Associated Types

type Rep PredKeyTypeType Source #

Methods

fromPredKeyRep PredKey x Source #

toRep PredKey x → PredKey Source #

Show PredKey Source # 
Instance details

Defined in Cardano.Constitution.Config.Types

Eq PredKey Source # 
Instance details

Defined in Cardano.Constitution.Config.Types

Methods

(==)PredKeyPredKeyBool Source #

(/=)PredKeyPredKeyBool Source #

Ord PredKey Source # 
Instance details

Defined in Cardano.Constitution.Config.Types

Eq PredKey Source # 
Instance details

Defined in Cardano.Constitution.Config.Types

Methods

(==)PredKeyPredKeyBool Source #

Lift DefaultUni PredKey Source # 
Instance details

Defined in Cardano.Constitution.Config.Instance.TxLift

Lift PredKey Source # 
Instance details

Defined in Cardano.Constitution.Config.Types

Methods

liftQuote m ⇒ PredKey → m Exp Source #

liftTyped ∷ ∀ (m ∷ TypeType). Quote m ⇒ PredKeyCode m PredKey Source #

Typeable DefaultUni PredKey Source # 
Instance details

Defined in Cardano.Constitution.Config.Instance.TxLift

type Rep PredKey Source # 
Instance details

Defined in Cardano.Constitution.Config.Types

type Rep PredKey = D1 ('MetaData "PredKey" "Cardano.Constitution.Config.Types" "cardano-constitution-1.34.0.0-inplace" 'False) (C1 ('MetaCons "MinValue" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "MaxValue" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "NotEqual" 'PrefixI 'False) (U1TypeType)))

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

Instances details
(Typeable DefaultUni predValue, Lift DefaultUni predValue) ⇒ Lift DefaultUni (Predicates predValue) Source # 
Instance details

Defined in Cardano.Constitution.Config.Instance.TxLift

Methods

liftPredicates predValue → RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source #

Lift v ⇒ Lift (Predicates v ∷ Type) Source # 
Instance details

Defined in Cardano.Constitution.Config.Types

Methods

liftQuote m ⇒ Predicates v → m Exp Source #

liftTyped ∷ ∀ (m ∷ TypeType). Quote m ⇒ Predicates v → Code m (Predicates v) Source #

FromJSON a ⇒ FromJSON (Predicates a) Source # 
Instance details

Defined in Cardano.Constitution.Config.Instance.FromJSON

Methods

parseJSON ∷ Value → Parser (Predicates a)

parseJSONList ∷ Value → Parser [Predicates a]

omittedFieldMaybe (Predicates a)

Show v ⇒ Show (Predicates v) Source # 
Instance details

Defined in Cardano.Constitution.Config.Types

Eq v ⇒ Eq (Predicates v) Source # 
Instance details

Defined in Cardano.Constitution.Config.Types

Methods

(==)Predicates v → Predicates v → Bool Source #

(/=)Predicates v → Predicates v → Bool Source #

Typeable DefaultUni Predicates Source # 
Instance details

Defined in Cardano.Constitution.Config.Instance.TxLift

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 ParamKey = Integer Source #

Promised to be a stable identifier (stable at least for a whole cardano era)

newtype ConstitutionConfig Source #

See Note [Manually constructing a Configuration value]

Constructors

ConstitutionConfig 

Instances

Instances details
FromJSON ConstitutionConfig Source # 
Instance details

Defined in Cardano.Constitution.Config.Instance.FromJSON

Show ConstitutionConfig Source # 
Instance details

Defined in Cardano.Constitution.Config.Types

Eq ConstitutionConfig Source # 
Instance details

Defined in Cardano.Constitution.Config.Types

Lift DefaultUni ConstitutionConfig Source # 
Instance details

Defined in Cardano.Constitution.Config.Instance.TxLift

Lift ConstitutionConfig Source # 
Instance details

Defined in Cardano.Constitution.Config.Types

Typeable DefaultUni ConstitutionConfig Source # 
Instance details

Defined in Cardano.Constitution.Config.Instance.TxLift

Orphan instances

Lift Rational Source # 
Instance details

Methods

liftQuote m ⇒ Rational → m Exp Source #

liftTyped ∷ ∀ (m ∷ TypeType). Quote m ⇒ RationalCode m Rational Source #