cardano-api:internal
Safe HaskellNone
LanguageHaskell2010

Cardano.Api.Eras.Case

Synopsis

Documentation

caseByronOrShelleyBasedEra :: a -> (ShelleyBasedEraConstraints era => ShelleyBasedEra era -> a) -> CardanoEra era -> a Source #

caseByronOrShelleyBasedEra f g era returns f in Byron and applies g to Shelley-based eras.

caseByronToAlonzoOrBabbageEraOnwards :: (ByronToAlonzoEraConstraints era => ByronToAlonzoEra era -> a) -> (BabbageEraOnwardsConstraints era => BabbageEraOnwards era -> a) -> CardanoEra era -> a Source #

caseByronToAlonzoOrBabbageEraOnwards f g era applies f to byron, shelley, allegra, mary, and alonzo; and g to babbage and later eras.

caseShelleyEraOnlyOrAllegraEraOnwards :: (ShelleyEraOnlyConstraints era => ShelleyEraOnly era -> a) -> (AllegraEraOnwardsConstraints era => AllegraEraOnwards era -> a) -> ShelleyBasedEra era -> a Source #

caseShelleyEraOnlyOrAllegraEraOnwards f g era applies f to shelley; and applies g to allegra and later eras.

caseShelleyToAllegraOrMaryEraOnwards :: (ShelleyToAllegraEraConstraints era => ShelleyToAllegraEra era -> a) -> (MaryEraOnwardsConstraints era => MaryEraOnwards era -> a) -> ShelleyBasedEra era -> a Source #

caseShelleyToAllegraOrMaryEraOnwards f g era applies f to shelley and allegra; and applies g to mary and later eras.

caseShelleyToMaryOrAlonzoEraOnwards :: (ShelleyToMaryEraConstraints era => ShelleyToMaryEra era -> a) -> (AlonzoEraOnwardsConstraints era => AlonzoEraOnwards era -> a) -> ShelleyBasedEra era -> a Source #

caseShelleyToMaryOrAlonzoEraOnwards f g era applies f to shelley, allegra, and mary; and applies g to alonzo and later eras.

caseShelleyToAlonzoOrBabbageEraOnwards :: (ShelleyToAlonzoEraConstraints era => ShelleyToAlonzoEra era -> a) -> (BabbageEraOnwardsConstraints era => BabbageEraOnwards era -> a) -> ShelleyBasedEra era -> a Source #

caseShelleyToAlonzoOrBabbageEraOnwards f g era applies f to shelley, allegra, mary, and alonzo; and applies g to babbage and later eras.

caseShelleyToBabbageOrConwayEraOnwards :: (ShelleyToBabbageEraConstraints era => ShelleyToBabbageEra era -> a) -> (ConwayEraOnwardsConstraints era => ConwayEraOnwards era -> a) -> ShelleyBasedEra era -> a Source #

caseShelleyToBabbageOrConwayEraOnwards f g era applies f to eras before conway; and applies g to conway and later eras.