Skip to content

Commit

Permalink
Introduce type Precedence.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanknowles committed Jul 3, 2020
1 parent ff55016 commit 97f6019
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/core/src/Cardano/Wallet/Primitive/Types.hs
Expand Up @@ -150,6 +150,7 @@ module Cardano.Wallet.Primitive.Types
, StakePoolTicker (..)

-- * Querying
, Precedence (..)
, SortOrder (..)

-- * Ranges
Expand Down Expand Up @@ -455,6 +456,17 @@ data WalletBalance = WalletBalance
Queries
-------------------------------------------------------------------------------}

-- | Indicates relative precedence.
--
-- For two 'Precedence' values @a@ and @b@:
--
-- * if @a > b@, then @a@ has higher precedence.
-- * if @a < b@, then @b@ has higher precedence.
-- * if @a = b@, then @a@ and @b@ have equal precedence.
--
newtype Precedence = Precedence { unPrecedence :: Word64 }
deriving (Bounded, Enum, Eq, Ord, Show, Read)

-- | Represents a sort order, applicable to the results returned by a query.
data SortOrder
= Ascending
Expand Down

0 comments on commit 97f6019

Please sign in to comment.