{-# OPTIONS_HADDOCK hide #-}
module Data.PerfectHash.Types.Nonces where
import Data.Default (Default, def)
newtype Nonce = Nonce Int
deriving Int -> Nonce -> ShowS
[Nonce] -> ShowS
Nonce -> String
(Int -> Nonce -> ShowS)
-> (Nonce -> String) -> ([Nonce] -> ShowS) -> Show Nonce
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Nonce] -> ShowS
$cshowList :: [Nonce] -> ShowS
show :: Nonce -> String
$cshow :: Nonce -> String
showsPrec :: Int -> Nonce -> ShowS
$cshowsPrec :: Int -> Nonce -> ShowS
Show
instance Default Nonce where
def :: Nonce
def = Int -> Nonce
Nonce Int
0
mapNonce :: (Int -> Int) -> Nonce -> Nonce
mapNonce :: (Int -> Int) -> Nonce -> Nonce
mapNonce Int -> Int
f (Nonce Int
x) = Int -> Nonce
Nonce (Int -> Nonce) -> Int -> Nonce
forall a b. (a -> b) -> a -> b
$ Int -> Int
f Int
x
isDirectSlot :: Int -> Bool
isDirectSlot :: Int -> Bool
isDirectSlot Int
val = Int
val Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
< Int
0