Skip to content

Commit

Permalink
Merge #1956
Browse files Browse the repository at this point in the history
1956: Revert "Remove unused type variables." r=dcoutts a=mrBliss

Revert "Remove unused type variables."

This reverts commit 156e38b.

This change was not compatible with GHC 8.6.5:

    src/Cardano/Ledger/Era.hs:92:25: error:
        Unexpected type ‘_’
        In the default declaration for ‘TranslationError’
        A default declaration should have form
          default TranslationError a b = ...
       |
    92 |   type TranslationError _ _ = Void

I don't think we (read: all downstream repos) are ready yet to burn that bridge,
at least not for something so trivial as this.

Co-authored-by: Thomas Winant <thomas@well-typed.com>
  • Loading branch information
iohk-bors[bot] and mrBliss authored Oct 30, 2020
2 parents f1b1a0c + c778e25 commit d6179d7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion shelley-ma/impl/src/Cardano/Ledger/Allegra/Translation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type instance PreviousEra (AllegraEra c) = ShelleyEra c
--
-- Note: if context is needed, please coordinate with consensus, who will have
-- to provide the context in the right place.
type instance TranslationContext (AllegraEra _) = ()
type instance TranslationContext (AllegraEra c) = ()

instance Crypto c => TranslateEra (AllegraEra c) NewEpochState where
translateEra ctxt nes =
Expand Down
2 changes: 1 addition & 1 deletion shelley-ma/impl/src/Cardano/Ledger/Mary/Translation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type instance PreviousEra (MaryEra c) = AllegraEra c
--
-- Note: if context is needed, please coordinate with consensus, who will have
-- to provide the context in the right place.
type instance TranslationContext (MaryEra _) = ()
type instance TranslationContext (MaryEra c) = ()

instance Crypto c => TranslateEra (MaryEra c) NewEpochState where
translateEra _ = error "TODO Allegra to Mary translation"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class (Era era, Era (PreviousEra era)) => TranslateEra era f where
-- concrete error type.
type TranslationError era f :: Type

type TranslationError _ _ = Void
type TranslationError era f = Void

-- | Translate a type @f@ parameterised by the era from an era to the era
-- after it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ data ShelleyEra c
instance CryptoClass.Crypto c => Era (ShelleyEra c) where
type Crypto (ShelleyEra c) = c

type instance Value (ShelleyEra _) = Coin
type instance Value (ShelleyEra c) = Coin

type TxBodyConstraints era =
( ChainData (TxBody era),
Expand Down

0 comments on commit d6179d7

Please sign in to comment.