-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This pull request adds `Eq` and `Ord` class instances for `BIP32Path` so that this type can be used in a container type such as `Data.Set.Set`.
- Loading branch information
Showing
2 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
lib/customer-deposit-wallet-pure/haskell/Cardano/Wallet/Address/BIP32.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
{-# LANGUAGE StandaloneDeriving #-} | ||
module Cardano.Wallet.Address.BIP32 where | ||
|
||
import Data.Word.Odd (Word31) | ||
|
||
data DerivationType = Soft | ||
| Hardened | ||
|
||
deriving instance Eq DerivationType | ||
|
||
deriving instance Ord DerivationType | ||
|
||
data BIP32Path = Root | ||
| Segment BIP32Path DerivationType Word31 | ||
|
||
deriving instance Eq BIP32Path | ||
|
||
deriving instance Ord BIP32Path | ||
|