cardano-api:internal
Safe HaskellNone
LanguageHaskell2010

Cardano.Api.Feature

Synopsis

Documentation

data Featured (eon :: Type -> Type) era a where Source #

A value only if the eon includes era

Constructors

Featured 

Fields

  • :: forall (eon :: Type -> Type) era a. eon era

    The witness that the eon includes era

  • -> a

    The value to use

  • -> Featured eon era a
     

Instances

Instances details
Functor (Featured eon era) Source # 
Instance details

Defined in Cardano.Api.Feature

Methods

fmap :: (a -> b) -> Featured eon era a -> Featured eon era b Source #

(<$) :: a -> Featured eon era b -> Featured eon era a Source #

(Show a, Show (eon era)) => Show (Featured eon era a) Source # 
Instance details

Defined in Cardano.Api.Feature

Methods

showsPrec :: Int -> Featured eon era a -> ShowS Source #

show :: Featured eon era a -> String Source #

showList :: [Featured eon era a] -> ShowS Source #

(Eq a, Eq (eon era)) => Eq (Featured eon era a) Source # 
Instance details

Defined in Cardano.Api.Feature

Methods

(==) :: Featured eon era a -> Featured eon era a -> Bool Source #

(/=) :: Featured eon era a -> Featured eon era a -> Bool Source #

mkFeatured Source #

Arguments

:: forall (eon :: Type -> Type) era a. (IsCardanoEra era, Eon eon) 
=> a

a value featured in eon

-> Maybe (Featured eon era a)

Just if era is in eon

Create a Featured with automatic witness conjuring

unFeatured :: forall (eon :: Type -> Type) era a. Featured eon era a -> a Source #

asFeaturedInEra :: forall (eon :: Type -> Type) a era. Eon eon => a -> CardanoEra era -> Maybe (Featured eon era a) Source #

Attempt to construct a FeatureValue from a value and era. If the eon is not supported in the era, then NoFeatureValue is returned.

asFeaturedInShelleyBasedEra :: forall (eon :: Type -> Type) a era. Eon eon => a -> ShelleyBasedEra era -> Maybe (Featured eon era a) Source #

Attempt to construct a FeatureValue from a value and a shelley-based-era.