File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 22
33## 1.17.0.0
44
5+ * Extract ` indexProxy ` from ` HashAnnotated ` type class and deprecate it.
56* Extract ` hashTxAuxData ` from ` EraTxAuxData ` into a standalone function.
67* Add ` TxAuxDataHash ` and deprecate ` AuxiliaryDayaHash ` in its favor.
78* Deprecate ` Cardano.Ledger.Crypto ` module in favor of ` cardano-protocol-tpraos:Cardano.Protocol.Crypto `
Original file line number Diff line number Diff line change @@ -76,7 +76,6 @@ module Cardano.Ledger.Hashes (
7676 -- ** Other operations
7777 castSafeHash ,
7878 extractHash ,
79- indexProxy ,
8079)
8180where
8281
@@ -386,10 +385,6 @@ instance Hash.HashAlgorithm h => SafeToHash (Hash.Hash h i) where
386385-- can be easily derived (because their methods have default methods when the type is a
387386-- newtype around a type that is 'SafeToHash'). For example,
388387class SafeToHash x => HashAnnotated x i | x -> i where
389- -- TODO: move outside of type class
390- indexProxy :: x -> Proxy i
391- indexProxy _ = Proxy @ i
392-
393388 -- | Create a @('SafeHash' i)@, given @(`HashAnnotated` x i)@ instance.
394389 hashAnnotated :: x -> SafeHash i
395390 hashAnnotated = makeHashWithExplicitProxys (Proxy @ i )
Original file line number Diff line number Diff line change 1+ {-# LANGUAGE ScopedTypeVariables #-}
2+ {-# LANGUAGE TypeApplications #-}
3+ {-# OPTIONS_GHC -Wno-redundant-constraints #-}
4+
15module Cardano.Ledger.SafeHash
26 {-# DEPRECATED "Use `Cardano.Ledger.Hashes` instead" #-} (
37 -- * SafeHash and SafeToHash
@@ -26,3 +30,8 @@ module Cardano.Ledger.SafeHash
2630where
2731
2832import Cardano.Ledger.Hashes
33+ import Data.Proxy
34+
35+ indexProxy :: forall x i . HashAnnotated x i => x -> Proxy i
36+ indexProxy _ = Proxy @ i
37+ {-# DEPRECATED indexProxy "As useless and unused" #-}
You can’t perform that action at this time.
0 commit comments