-
Notifications
You must be signed in to change notification settings - Fork 86
/
Eras.hs
64 lines (53 loc) · 2.19 KB
/
Eras.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
module Ouroboros.Consensus.Shelley.Eras (
-- * Eras based on the Shelley ledger
ShelleyEra
, AllegraEra
, MaryEra
-- * Eras instantiated with standard crypto
, StandardShelley
, StandardAllegra
, StandardMary
-- * Shelley-based era
, ShelleyBasedEra
-- * Type synonyms for convenience
, EraCrypto
-- * Re-exports
, StandardCrypto
) where
import Cardano.Ledger.Era (Crypto)
import Cardano.Ledger.Shelley (ShelleyEra)
import Ouroboros.Consensus.Shelley.Protocol.Crypto (StandardCrypto)
import Shelley.Spec.Ledger.API (ShelleyBasedEra)
{-------------------------------------------------------------------------------
Eras based on the Shelley ledger
-------------------------------------------------------------------------------}
-- | The era after Shelley is Allegra, the illegitimate daughter of Byron.
--
-- In this era, we introduce time locks and miscellaneous fixes for the Shelley
-- era.
--
-- TODO #2668 Change this to the proper Allegra era
type AllegraEra c = ShelleyEra c
-- | The era after Allegra is Mary (Shelley), the wife of Percy Shelley.
--
-- In this era, we introduce multi-asset (hence MA-ry).
--
-- TODO #2668 Change this to the proper Mary era
type MaryEra c = ShelleyEra c
{-------------------------------------------------------------------------------
Eras instantiated with standard crypto
-------------------------------------------------------------------------------}
-- | The Shelley era with standard crypto
type StandardShelley = ShelleyEra StandardCrypto
-- | The Allegra era with standard crypto
type StandardAllegra = AllegraEra StandardCrypto
-- | The Mary era with standard crypto
type StandardMary = MaryEra StandardCrypto
{-------------------------------------------------------------------------------
Type synonyms for convenience
-------------------------------------------------------------------------------}
-- | The 'Cardano.Ledger.Era.Crypto' type family conflicts with the
-- 'Cardano.Ledger.Crypto.Crypto' class. To avoid having to import one or both
-- of them qualified, define 'EraCrypto' as an alias of the former: /return the
-- crypto used by this era/.
type EraCrypto era = Crypto era