{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
module Codec.Encryption.OpenPGP.Types.Internal.Base
( KeyVersion (..)
, IV (..)
, S2K (..)
, SymmetricAlgorithm (..)
, AEADAlgorithm (..)
, PubKeyAlgorithm (..)
, ThirtyTwoBitTimeStamp (..)
, ThirtyTwoBitDuration (..)
, Exportability (..)
, TrustLevel (..)
, TrustAmount (..)
, AlmostPublicDomainRegex
, Revocability (..)
, RevocationReason (..)
, KeyServer
, SignatureHash (..)
, PacketVersion
, V3Expiration
, CompressedDataPayload
, FileName (..)
, ImageData (..)
, NestedFlag (..)
, HashAlgorithm (..)
, bsToHexUpper
, Hashed
, Unhashed
, V4Sig
, V6Sig
, ByteRange (..)
, rangeOffset
, rangeLength
, WireRepRef (..)
, wireRepLength
, wireRepName
, wireRepWasOriginallyArmored
, WireRepRefs
, wireRepRef
, namedWireRepRef
, mkWireRepRefWithLength
, mkWireRepRef
, SignaturePayload (..)
, _SigV3
, _SigV4
, _SigV6
, _SigVOther
, Fingerprint (..)
, SessionKey (..)
, SigType (..)
, SignatureSalt (..)
, Salt (..)
, Salt8 (..)
, Salt16 (..)
, CompressionAlgorithm (..)
, LiteralDataType (..)
, UserAttrSubPacket (..)
, EightOctetKeyId (..)
, MPI (..)
, SignaturePayloadVersion (..)
, SignaturePayloadV (..)
, SomeSignaturePayload (..)
, toSignaturePayload
, toSomeSignaturePayload
, signaturePayloadVersion
, asSignaturePayloadV3
, asSignaturePayloadV4
, asSignaturePayloadV6
, asSignaturePayloadOther
, FutureVal (..)
, SigSubPacket (..)
, sspCriticality
, sspPayload
, SigSubPacketPayload (..)
, ECCCurve (..)
, IssuerFingerprintVersion (..)
, IterationCount (..)
, salt8FromSalt
, salt16FromSalt
, saltFromSalt8
, saltFromSalt16
, Block (..)
, FutureFlag (..)
, ImageHeader (..)
, issuerFingerprintVersionToPacketVersion
, packetVersionToIssuerFingerprintVersion
, NotationName (..)
, NotationValue (..)
, URL (..)
, RevocationClass (..)
, SubpacketList (..)
, fromSubpacketList
, toSubpacketList
, emptyHashedSubpackets
, emptyUnhashedSubpackets
, consHashedSubpacket
, consUnhashedSubpacket
, spanByteRanges
, RevocationCode (..)
, KeyFlag (..)
, KeyIdentifier (..)
, FeatureFlag (..)
, NotationFlag (..)
, KSPFlag (..)
, mkRevocationClass
, mkNotationFlag
, SpacedFingerprint (..)
, ImageFormat (..)
, Passphrase (..)
) where
import Control.Applicative ((<|>))
import Control.Arrow ((***))
import Control.Lens (Wrapped, makeLenses, makePrisms, op)
import Control.Monad (mzero)
import Data.Aeson (object, (.=))
import qualified Data.Aeson as A
import qualified Data.Aeson.Key as AK
import qualified Data.Aeson.TH as ATH
import Data.Bits ((.&.))
import Data.ByteArray (ByteArray, ByteArrayAccess)
import Data.ByteArray.Encoding
( Base (..)
, convertFromBase
, convertToBase
)
import qualified Data.ByteString as B
import qualified Data.ByteString.Base16 as B16
import qualified Data.ByteString.Char8 as BC8
import Data.ByteString.Lazy (ByteString)
import qualified Data.ByteString.Lazy as BL
import qualified Data.ByteString.Lazy.Char8 as BLC8
import Data.Char (toLower, toUpper)
import Data.Data (Data)
import Data.Hashable (Hashable (..))
import Data.Int (Int64)
import Data.Kind (Type)
import Data.List (unfoldr)
import Data.List.NonEmpty (NonEmpty)
import qualified Data.List.NonEmpty as NE
import Data.List.Split (chunksOf)
import Data.Maybe (fromMaybe)
import Data.Ord (comparing)
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Text (Text)
import Data.Text.Encoding (decodeUtf8With, encodeUtf8)
import Data.Text.Encoding.Error (lenientDecode)
import Data.Time.Clock.POSIX (posixSecondsToUTCTime)
import Data.Time.Format (formatTime)
import Data.Time.Locale.Compat (defaultTimeLocale)
import Data.Typeable (Typeable)
import Data.Word (Word16, Word32, Word8)
import GHC.Generics (Generic)
import Network.URI (URI (..), nullURI, parseURI, uriToString)
import Numeric (readHex)
import Prettyprinter (Pretty (..), hsep, punctuate, space, (<+>))
import Codec.Encryption.OpenPGP.Types.Internal.PrettyUtils
( prettyBS
, prettyLBS
)
newtype Exportability = Exportability {Exportability -> Bool
unExportability :: Bool}
deriving (Typeable Exportability
Typeable Exportability =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Exportability -> c Exportability)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Exportability)
-> (Exportability -> Constr)
-> (Exportability -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Exportability))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Exportability))
-> ((forall b. Data b => b -> b) -> Exportability -> Exportability)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Exportability -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Exportability -> r)
-> (forall u. (forall d. Data d => d -> u) -> Exportability -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> Exportability -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Exportability -> m Exportability)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Exportability -> m Exportability)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Exportability -> m Exportability)
-> Data Exportability
Exportability -> Constr
Exportability -> DataType
(forall b. Data b => b -> b) -> Exportability -> Exportability
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Exportability -> u
forall u. (forall d. Data d => d -> u) -> Exportability -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Exportability -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Exportability -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Exportability -> m Exportability
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Exportability -> m Exportability
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Exportability
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Exportability -> c Exportability
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Exportability)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Exportability)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Exportability -> c Exportability
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Exportability -> c Exportability
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Exportability
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Exportability
$ctoConstr :: Exportability -> Constr
toConstr :: Exportability -> Constr
$cdataTypeOf :: Exportability -> DataType
dataTypeOf :: Exportability -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Exportability)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Exportability)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Exportability)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Exportability)
$cgmapT :: (forall b. Data b => b -> b) -> Exportability -> Exportability
gmapT :: (forall b. Data b => b -> b) -> Exportability -> Exportability
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Exportability -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Exportability -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Exportability -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Exportability -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Exportability -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Exportability -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Exportability -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Exportability -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Exportability -> m Exportability
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Exportability -> m Exportability
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Exportability -> m Exportability
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Exportability -> m Exportability
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Exportability -> m Exportability
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Exportability -> m Exportability
Data, Exportability -> Exportability -> Bool
(Exportability -> Exportability -> Bool)
-> (Exportability -> Exportability -> Bool) -> Eq Exportability
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Exportability -> Exportability -> Bool
== :: Exportability -> Exportability -> Bool
$c/= :: Exportability -> Exportability -> Bool
/= :: Exportability -> Exportability -> Bool
Eq, (forall x. Exportability -> Rep Exportability x)
-> (forall x. Rep Exportability x -> Exportability)
-> Generic Exportability
forall x. Rep Exportability x -> Exportability
forall x. Exportability -> Rep Exportability x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. Exportability -> Rep Exportability x
from :: forall x. Exportability -> Rep Exportability x
$cto :: forall x. Rep Exportability x -> Exportability
to :: forall x. Rep Exportability x -> Exportability
Generic, Eq Exportability
Eq Exportability =>
(Exportability -> Exportability -> Ordering)
-> (Exportability -> Exportability -> Bool)
-> (Exportability -> Exportability -> Bool)
-> (Exportability -> Exportability -> Bool)
-> (Exportability -> Exportability -> Bool)
-> (Exportability -> Exportability -> Exportability)
-> (Exportability -> Exportability -> Exportability)
-> Ord Exportability
Exportability -> Exportability -> Bool
Exportability -> Exportability -> Ordering
Exportability -> Exportability -> Exportability
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Exportability -> Exportability -> Ordering
compare :: Exportability -> Exportability -> Ordering
$c< :: Exportability -> Exportability -> Bool
< :: Exportability -> Exportability -> Bool
$c<= :: Exportability -> Exportability -> Bool
<= :: Exportability -> Exportability -> Bool
$c> :: Exportability -> Exportability -> Bool
> :: Exportability -> Exportability -> Bool
$c>= :: Exportability -> Exportability -> Bool
>= :: Exportability -> Exportability -> Bool
$cmax :: Exportability -> Exportability -> Exportability
max :: Exportability -> Exportability -> Exportability
$cmin :: Exportability -> Exportability -> Exportability
min :: Exportability -> Exportability -> Exportability
Ord, Int -> Exportability -> ShowS
[Exportability] -> ShowS
Exportability -> String
(Int -> Exportability -> ShowS)
-> (Exportability -> String)
-> ([Exportability] -> ShowS)
-> Show Exportability
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Exportability -> ShowS
showsPrec :: Int -> Exportability -> ShowS
$cshow :: Exportability -> String
show :: Exportability -> String
$cshowList :: [Exportability] -> ShowS
showList :: [Exportability] -> ShowS
Show, Typeable)
instance Wrapped Exportability
instance Hashable Exportability
instance Pretty Exportability where
pretty :: forall ann. Exportability -> Doc ann
pretty = Bool -> Doc ann
forall ann. Bool -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (Bool -> Doc ann)
-> (Exportability -> Bool) -> Exportability -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped Exportability -> Exportability)
-> Exportability -> Unwrapped Exportability
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op Bool -> Exportability
Unwrapped Exportability -> Exportability
Exportability
$(ATH.deriveJSON ATH.defaultOptions ''Exportability)
newtype TrustLevel = TrustLevel {TrustLevel -> Word8
unTrustLevel :: Word8}
deriving (Typeable TrustLevel
Typeable TrustLevel =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TrustLevel -> c TrustLevel)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TrustLevel)
-> (TrustLevel -> Constr)
-> (TrustLevel -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TrustLevel))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TrustLevel))
-> ((forall b. Data b => b -> b) -> TrustLevel -> TrustLevel)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TrustLevel -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TrustLevel -> r)
-> (forall u. (forall d. Data d => d -> u) -> TrustLevel -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> TrustLevel -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TrustLevel -> m TrustLevel)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TrustLevel -> m TrustLevel)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TrustLevel -> m TrustLevel)
-> Data TrustLevel
TrustLevel -> Constr
TrustLevel -> DataType
(forall b. Data b => b -> b) -> TrustLevel -> TrustLevel
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> TrustLevel -> u
forall u. (forall d. Data d => d -> u) -> TrustLevel -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TrustLevel -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TrustLevel -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TrustLevel -> m TrustLevel
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TrustLevel -> m TrustLevel
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TrustLevel
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TrustLevel -> c TrustLevel
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TrustLevel)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TrustLevel)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TrustLevel -> c TrustLevel
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TrustLevel -> c TrustLevel
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TrustLevel
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TrustLevel
$ctoConstr :: TrustLevel -> Constr
toConstr :: TrustLevel -> Constr
$cdataTypeOf :: TrustLevel -> DataType
dataTypeOf :: TrustLevel -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TrustLevel)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TrustLevel)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TrustLevel)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TrustLevel)
$cgmapT :: (forall b. Data b => b -> b) -> TrustLevel -> TrustLevel
gmapT :: (forall b. Data b => b -> b) -> TrustLevel -> TrustLevel
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TrustLevel -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TrustLevel -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TrustLevel -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TrustLevel -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> TrustLevel -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> TrustLevel -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TrustLevel -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TrustLevel -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TrustLevel -> m TrustLevel
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TrustLevel -> m TrustLevel
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TrustLevel -> m TrustLevel
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TrustLevel -> m TrustLevel
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TrustLevel -> m TrustLevel
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TrustLevel -> m TrustLevel
Data, TrustLevel -> TrustLevel -> Bool
(TrustLevel -> TrustLevel -> Bool)
-> (TrustLevel -> TrustLevel -> Bool) -> Eq TrustLevel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TrustLevel -> TrustLevel -> Bool
== :: TrustLevel -> TrustLevel -> Bool
$c/= :: TrustLevel -> TrustLevel -> Bool
/= :: TrustLevel -> TrustLevel -> Bool
Eq, (forall x. TrustLevel -> Rep TrustLevel x)
-> (forall x. Rep TrustLevel x -> TrustLevel) -> Generic TrustLevel
forall x. Rep TrustLevel x -> TrustLevel
forall x. TrustLevel -> Rep TrustLevel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. TrustLevel -> Rep TrustLevel x
from :: forall x. TrustLevel -> Rep TrustLevel x
$cto :: forall x. Rep TrustLevel x -> TrustLevel
to :: forall x. Rep TrustLevel x -> TrustLevel
Generic, Eq TrustLevel
Eq TrustLevel =>
(TrustLevel -> TrustLevel -> Ordering)
-> (TrustLevel -> TrustLevel -> Bool)
-> (TrustLevel -> TrustLevel -> Bool)
-> (TrustLevel -> TrustLevel -> Bool)
-> (TrustLevel -> TrustLevel -> Bool)
-> (TrustLevel -> TrustLevel -> TrustLevel)
-> (TrustLevel -> TrustLevel -> TrustLevel)
-> Ord TrustLevel
TrustLevel -> TrustLevel -> Bool
TrustLevel -> TrustLevel -> Ordering
TrustLevel -> TrustLevel -> TrustLevel
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: TrustLevel -> TrustLevel -> Ordering
compare :: TrustLevel -> TrustLevel -> Ordering
$c< :: TrustLevel -> TrustLevel -> Bool
< :: TrustLevel -> TrustLevel -> Bool
$c<= :: TrustLevel -> TrustLevel -> Bool
<= :: TrustLevel -> TrustLevel -> Bool
$c> :: TrustLevel -> TrustLevel -> Bool
> :: TrustLevel -> TrustLevel -> Bool
$c>= :: TrustLevel -> TrustLevel -> Bool
>= :: TrustLevel -> TrustLevel -> Bool
$cmax :: TrustLevel -> TrustLevel -> TrustLevel
max :: TrustLevel -> TrustLevel -> TrustLevel
$cmin :: TrustLevel -> TrustLevel -> TrustLevel
min :: TrustLevel -> TrustLevel -> TrustLevel
Ord, Int -> TrustLevel -> ShowS
[TrustLevel] -> ShowS
TrustLevel -> String
(Int -> TrustLevel -> ShowS)
-> (TrustLevel -> String)
-> ([TrustLevel] -> ShowS)
-> Show TrustLevel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TrustLevel -> ShowS
showsPrec :: Int -> TrustLevel -> ShowS
$cshow :: TrustLevel -> String
show :: TrustLevel -> String
$cshowList :: [TrustLevel] -> ShowS
showList :: [TrustLevel] -> ShowS
Show, Typeable)
instance Wrapped TrustLevel
instance Hashable TrustLevel
instance Pretty TrustLevel where
pretty :: forall ann. TrustLevel -> Doc ann
pretty = Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (Word8 -> Doc ann)
-> (TrustLevel -> Word8) -> TrustLevel -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped TrustLevel -> TrustLevel)
-> TrustLevel -> Unwrapped TrustLevel
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op Word8 -> TrustLevel
Unwrapped TrustLevel -> TrustLevel
TrustLevel
$(ATH.deriveJSON ATH.defaultOptions ''TrustLevel)
newtype TrustAmount = TrustAmount {TrustAmount -> Word8
unTrustAmount :: Word8}
deriving (Typeable TrustAmount
Typeable TrustAmount =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TrustAmount -> c TrustAmount)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TrustAmount)
-> (TrustAmount -> Constr)
-> (TrustAmount -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TrustAmount))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TrustAmount))
-> ((forall b. Data b => b -> b) -> TrustAmount -> TrustAmount)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TrustAmount -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TrustAmount -> r)
-> (forall u. (forall d. Data d => d -> u) -> TrustAmount -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> TrustAmount -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TrustAmount -> m TrustAmount)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TrustAmount -> m TrustAmount)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TrustAmount -> m TrustAmount)
-> Data TrustAmount
TrustAmount -> Constr
TrustAmount -> DataType
(forall b. Data b => b -> b) -> TrustAmount -> TrustAmount
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> TrustAmount -> u
forall u. (forall d. Data d => d -> u) -> TrustAmount -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TrustAmount -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TrustAmount -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TrustAmount -> m TrustAmount
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TrustAmount -> m TrustAmount
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TrustAmount
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TrustAmount -> c TrustAmount
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TrustAmount)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TrustAmount)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TrustAmount -> c TrustAmount
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TrustAmount -> c TrustAmount
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TrustAmount
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TrustAmount
$ctoConstr :: TrustAmount -> Constr
toConstr :: TrustAmount -> Constr
$cdataTypeOf :: TrustAmount -> DataType
dataTypeOf :: TrustAmount -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TrustAmount)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TrustAmount)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TrustAmount)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TrustAmount)
$cgmapT :: (forall b. Data b => b -> b) -> TrustAmount -> TrustAmount
gmapT :: (forall b. Data b => b -> b) -> TrustAmount -> TrustAmount
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TrustAmount -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TrustAmount -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TrustAmount -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TrustAmount -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> TrustAmount -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> TrustAmount -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TrustAmount -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TrustAmount -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TrustAmount -> m TrustAmount
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TrustAmount -> m TrustAmount
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TrustAmount -> m TrustAmount
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TrustAmount -> m TrustAmount
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TrustAmount -> m TrustAmount
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TrustAmount -> m TrustAmount
Data, TrustAmount -> TrustAmount -> Bool
(TrustAmount -> TrustAmount -> Bool)
-> (TrustAmount -> TrustAmount -> Bool) -> Eq TrustAmount
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TrustAmount -> TrustAmount -> Bool
== :: TrustAmount -> TrustAmount -> Bool
$c/= :: TrustAmount -> TrustAmount -> Bool
/= :: TrustAmount -> TrustAmount -> Bool
Eq, (forall x. TrustAmount -> Rep TrustAmount x)
-> (forall x. Rep TrustAmount x -> TrustAmount)
-> Generic TrustAmount
forall x. Rep TrustAmount x -> TrustAmount
forall x. TrustAmount -> Rep TrustAmount x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. TrustAmount -> Rep TrustAmount x
from :: forall x. TrustAmount -> Rep TrustAmount x
$cto :: forall x. Rep TrustAmount x -> TrustAmount
to :: forall x. Rep TrustAmount x -> TrustAmount
Generic, Eq TrustAmount
Eq TrustAmount =>
(TrustAmount -> TrustAmount -> Ordering)
-> (TrustAmount -> TrustAmount -> Bool)
-> (TrustAmount -> TrustAmount -> Bool)
-> (TrustAmount -> TrustAmount -> Bool)
-> (TrustAmount -> TrustAmount -> Bool)
-> (TrustAmount -> TrustAmount -> TrustAmount)
-> (TrustAmount -> TrustAmount -> TrustAmount)
-> Ord TrustAmount
TrustAmount -> TrustAmount -> Bool
TrustAmount -> TrustAmount -> Ordering
TrustAmount -> TrustAmount -> TrustAmount
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: TrustAmount -> TrustAmount -> Ordering
compare :: TrustAmount -> TrustAmount -> Ordering
$c< :: TrustAmount -> TrustAmount -> Bool
< :: TrustAmount -> TrustAmount -> Bool
$c<= :: TrustAmount -> TrustAmount -> Bool
<= :: TrustAmount -> TrustAmount -> Bool
$c> :: TrustAmount -> TrustAmount -> Bool
> :: TrustAmount -> TrustAmount -> Bool
$c>= :: TrustAmount -> TrustAmount -> Bool
>= :: TrustAmount -> TrustAmount -> Bool
$cmax :: TrustAmount -> TrustAmount -> TrustAmount
max :: TrustAmount -> TrustAmount -> TrustAmount
$cmin :: TrustAmount -> TrustAmount -> TrustAmount
min :: TrustAmount -> TrustAmount -> TrustAmount
Ord, Int -> TrustAmount -> ShowS
[TrustAmount] -> ShowS
TrustAmount -> String
(Int -> TrustAmount -> ShowS)
-> (TrustAmount -> String)
-> ([TrustAmount] -> ShowS)
-> Show TrustAmount
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TrustAmount -> ShowS
showsPrec :: Int -> TrustAmount -> ShowS
$cshow :: TrustAmount -> String
show :: TrustAmount -> String
$cshowList :: [TrustAmount] -> ShowS
showList :: [TrustAmount] -> ShowS
Show, Typeable)
instance Wrapped TrustAmount
instance Hashable TrustAmount
instance Pretty TrustAmount where
pretty :: forall ann. TrustAmount -> Doc ann
pretty = Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (Word8 -> Doc ann)
-> (TrustAmount -> Word8) -> TrustAmount -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped TrustAmount -> TrustAmount)
-> TrustAmount -> Unwrapped TrustAmount
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op Word8 -> TrustAmount
Unwrapped TrustAmount -> TrustAmount
TrustAmount
$(ATH.deriveJSON ATH.defaultOptions ''TrustAmount)
type AlmostPublicDomainRegex = ByteString
newtype Revocability = Revocability {Revocability -> Bool
unRevocability :: Bool}
deriving (Typeable Revocability
Typeable Revocability =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Revocability -> c Revocability)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Revocability)
-> (Revocability -> Constr)
-> (Revocability -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Revocability))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Revocability))
-> ((forall b. Data b => b -> b) -> Revocability -> Revocability)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Revocability -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Revocability -> r)
-> (forall u. (forall d. Data d => d -> u) -> Revocability -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> Revocability -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Revocability -> m Revocability)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Revocability -> m Revocability)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Revocability -> m Revocability)
-> Data Revocability
Revocability -> Constr
Revocability -> DataType
(forall b. Data b => b -> b) -> Revocability -> Revocability
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Revocability -> u
forall u. (forall d. Data d => d -> u) -> Revocability -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Revocability -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Revocability -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Revocability -> m Revocability
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Revocability -> m Revocability
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Revocability
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Revocability -> c Revocability
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Revocability)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Revocability)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Revocability -> c Revocability
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Revocability -> c Revocability
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Revocability
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Revocability
$ctoConstr :: Revocability -> Constr
toConstr :: Revocability -> Constr
$cdataTypeOf :: Revocability -> DataType
dataTypeOf :: Revocability -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Revocability)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Revocability)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Revocability)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Revocability)
$cgmapT :: (forall b. Data b => b -> b) -> Revocability -> Revocability
gmapT :: (forall b. Data b => b -> b) -> Revocability -> Revocability
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Revocability -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Revocability -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Revocability -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Revocability -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Revocability -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Revocability -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Revocability -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Revocability -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Revocability -> m Revocability
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Revocability -> m Revocability
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Revocability -> m Revocability
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Revocability -> m Revocability
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Revocability -> m Revocability
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Revocability -> m Revocability
Data, Revocability -> Revocability -> Bool
(Revocability -> Revocability -> Bool)
-> (Revocability -> Revocability -> Bool) -> Eq Revocability
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Revocability -> Revocability -> Bool
== :: Revocability -> Revocability -> Bool
$c/= :: Revocability -> Revocability -> Bool
/= :: Revocability -> Revocability -> Bool
Eq, (forall x. Revocability -> Rep Revocability x)
-> (forall x. Rep Revocability x -> Revocability)
-> Generic Revocability
forall x. Rep Revocability x -> Revocability
forall x. Revocability -> Rep Revocability x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. Revocability -> Rep Revocability x
from :: forall x. Revocability -> Rep Revocability x
$cto :: forall x. Rep Revocability x -> Revocability
to :: forall x. Rep Revocability x -> Revocability
Generic, Eq Revocability
Eq Revocability =>
(Revocability -> Revocability -> Ordering)
-> (Revocability -> Revocability -> Bool)
-> (Revocability -> Revocability -> Bool)
-> (Revocability -> Revocability -> Bool)
-> (Revocability -> Revocability -> Bool)
-> (Revocability -> Revocability -> Revocability)
-> (Revocability -> Revocability -> Revocability)
-> Ord Revocability
Revocability -> Revocability -> Bool
Revocability -> Revocability -> Ordering
Revocability -> Revocability -> Revocability
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Revocability -> Revocability -> Ordering
compare :: Revocability -> Revocability -> Ordering
$c< :: Revocability -> Revocability -> Bool
< :: Revocability -> Revocability -> Bool
$c<= :: Revocability -> Revocability -> Bool
<= :: Revocability -> Revocability -> Bool
$c> :: Revocability -> Revocability -> Bool
> :: Revocability -> Revocability -> Bool
$c>= :: Revocability -> Revocability -> Bool
>= :: Revocability -> Revocability -> Bool
$cmax :: Revocability -> Revocability -> Revocability
max :: Revocability -> Revocability -> Revocability
$cmin :: Revocability -> Revocability -> Revocability
min :: Revocability -> Revocability -> Revocability
Ord, Int -> Revocability -> ShowS
[Revocability] -> ShowS
Revocability -> String
(Int -> Revocability -> ShowS)
-> (Revocability -> String)
-> ([Revocability] -> ShowS)
-> Show Revocability
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Revocability -> ShowS
showsPrec :: Int -> Revocability -> ShowS
$cshow :: Revocability -> String
show :: Revocability -> String
$cshowList :: [Revocability] -> ShowS
showList :: [Revocability] -> ShowS
Show, Typeable)
instance Wrapped Revocability
instance Hashable Revocability
instance Pretty Revocability where
pretty :: forall ann. Revocability -> Doc ann
pretty = Bool -> Doc ann
forall ann. Bool -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (Bool -> Doc ann)
-> (Revocability -> Bool) -> Revocability -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped Revocability -> Revocability)
-> Revocability -> Unwrapped Revocability
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op Bool -> Revocability
Unwrapped Revocability -> Revocability
Revocability
$(ATH.deriveJSON ATH.defaultOptions ''Revocability)
newtype RevocationReason = RevocationReason {RevocationReason -> Text
unRevocationReason :: Text}
deriving (Typeable RevocationReason
Typeable RevocationReason =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RevocationReason -> c RevocationReason)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RevocationReason)
-> (RevocationReason -> Constr)
-> (RevocationReason -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RevocationReason))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RevocationReason))
-> ((forall b. Data b => b -> b)
-> RevocationReason -> RevocationReason)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationReason -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationReason -> r)
-> (forall u.
(forall d. Data d => d -> u) -> RevocationReason -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> RevocationReason -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RevocationReason -> m RevocationReason)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationReason -> m RevocationReason)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationReason -> m RevocationReason)
-> Data RevocationReason
RevocationReason -> Constr
RevocationReason -> DataType
(forall b. Data b => b -> b)
-> RevocationReason -> RevocationReason
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> RevocationReason -> u
forall u. (forall d. Data d => d -> u) -> RevocationReason -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationReason -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationReason -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RevocationReason -> m RevocationReason
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationReason -> m RevocationReason
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RevocationReason
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RevocationReason -> c RevocationReason
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RevocationReason)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RevocationReason)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RevocationReason -> c RevocationReason
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RevocationReason -> c RevocationReason
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RevocationReason
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RevocationReason
$ctoConstr :: RevocationReason -> Constr
toConstr :: RevocationReason -> Constr
$cdataTypeOf :: RevocationReason -> DataType
dataTypeOf :: RevocationReason -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RevocationReason)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RevocationReason)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RevocationReason)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RevocationReason)
$cgmapT :: (forall b. Data b => b -> b)
-> RevocationReason -> RevocationReason
gmapT :: (forall b. Data b => b -> b)
-> RevocationReason -> RevocationReason
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationReason -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationReason -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationReason -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationReason -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> RevocationReason -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> RevocationReason -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> RevocationReason -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> RevocationReason -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RevocationReason -> m RevocationReason
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RevocationReason -> m RevocationReason
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationReason -> m RevocationReason
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationReason -> m RevocationReason
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationReason -> m RevocationReason
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationReason -> m RevocationReason
Data, RevocationReason -> RevocationReason -> Bool
(RevocationReason -> RevocationReason -> Bool)
-> (RevocationReason -> RevocationReason -> Bool)
-> Eq RevocationReason
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RevocationReason -> RevocationReason -> Bool
== :: RevocationReason -> RevocationReason -> Bool
$c/= :: RevocationReason -> RevocationReason -> Bool
/= :: RevocationReason -> RevocationReason -> Bool
Eq, (forall x. RevocationReason -> Rep RevocationReason x)
-> (forall x. Rep RevocationReason x -> RevocationReason)
-> Generic RevocationReason
forall x. Rep RevocationReason x -> RevocationReason
forall x. RevocationReason -> Rep RevocationReason x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. RevocationReason -> Rep RevocationReason x
from :: forall x. RevocationReason -> Rep RevocationReason x
$cto :: forall x. Rep RevocationReason x -> RevocationReason
to :: forall x. Rep RevocationReason x -> RevocationReason
Generic, Eq RevocationReason
Eq RevocationReason =>
(RevocationReason -> RevocationReason -> Ordering)
-> (RevocationReason -> RevocationReason -> Bool)
-> (RevocationReason -> RevocationReason -> Bool)
-> (RevocationReason -> RevocationReason -> Bool)
-> (RevocationReason -> RevocationReason -> Bool)
-> (RevocationReason -> RevocationReason -> RevocationReason)
-> (RevocationReason -> RevocationReason -> RevocationReason)
-> Ord RevocationReason
RevocationReason -> RevocationReason -> Bool
RevocationReason -> RevocationReason -> Ordering
RevocationReason -> RevocationReason -> RevocationReason
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: RevocationReason -> RevocationReason -> Ordering
compare :: RevocationReason -> RevocationReason -> Ordering
$c< :: RevocationReason -> RevocationReason -> Bool
< :: RevocationReason -> RevocationReason -> Bool
$c<= :: RevocationReason -> RevocationReason -> Bool
<= :: RevocationReason -> RevocationReason -> Bool
$c> :: RevocationReason -> RevocationReason -> Bool
> :: RevocationReason -> RevocationReason -> Bool
$c>= :: RevocationReason -> RevocationReason -> Bool
>= :: RevocationReason -> RevocationReason -> Bool
$cmax :: RevocationReason -> RevocationReason -> RevocationReason
max :: RevocationReason -> RevocationReason -> RevocationReason
$cmin :: RevocationReason -> RevocationReason -> RevocationReason
min :: RevocationReason -> RevocationReason -> RevocationReason
Ord, Int -> RevocationReason -> ShowS
[RevocationReason] -> ShowS
RevocationReason -> String
(Int -> RevocationReason -> ShowS)
-> (RevocationReason -> String)
-> ([RevocationReason] -> ShowS)
-> Show RevocationReason
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RevocationReason -> ShowS
showsPrec :: Int -> RevocationReason -> ShowS
$cshow :: RevocationReason -> String
show :: RevocationReason -> String
$cshowList :: [RevocationReason] -> ShowS
showList :: [RevocationReason] -> ShowS
Show, Typeable)
instance Wrapped RevocationReason
instance Hashable RevocationReason
instance Pretty RevocationReason where
pretty :: forall ann. RevocationReason -> Doc ann
pretty = Text -> Doc ann
forall ann. Text -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (Text -> Doc ann)
-> (RevocationReason -> Text) -> RevocationReason -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped RevocationReason -> RevocationReason)
-> RevocationReason -> Unwrapped RevocationReason
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op Text -> RevocationReason
Unwrapped RevocationReason -> RevocationReason
RevocationReason
$(ATH.deriveJSON ATH.defaultOptions ''RevocationReason)
type KeyServer = ByteString
type PacketVersion = Word8
type V3Expiration = Word16
type CompressedDataPayload = ByteString
newtype NestedFlag = NestedFlag {NestedFlag -> Bool
unNestedFlag :: Bool}
deriving (Typeable NestedFlag
Typeable NestedFlag =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NestedFlag -> c NestedFlag)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NestedFlag)
-> (NestedFlag -> Constr)
-> (NestedFlag -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NestedFlag))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NestedFlag))
-> ((forall b. Data b => b -> b) -> NestedFlag -> NestedFlag)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NestedFlag -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NestedFlag -> r)
-> (forall u. (forall d. Data d => d -> u) -> NestedFlag -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> NestedFlag -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NestedFlag -> m NestedFlag)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NestedFlag -> m NestedFlag)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NestedFlag -> m NestedFlag)
-> Data NestedFlag
NestedFlag -> Constr
NestedFlag -> DataType
(forall b. Data b => b -> b) -> NestedFlag -> NestedFlag
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> NestedFlag -> u
forall u. (forall d. Data d => d -> u) -> NestedFlag -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NestedFlag -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NestedFlag -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NestedFlag -> m NestedFlag
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NestedFlag -> m NestedFlag
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NestedFlag
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NestedFlag -> c NestedFlag
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NestedFlag)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NestedFlag)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NestedFlag -> c NestedFlag
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NestedFlag -> c NestedFlag
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NestedFlag
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NestedFlag
$ctoConstr :: NestedFlag -> Constr
toConstr :: NestedFlag -> Constr
$cdataTypeOf :: NestedFlag -> DataType
dataTypeOf :: NestedFlag -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NestedFlag)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NestedFlag)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NestedFlag)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NestedFlag)
$cgmapT :: (forall b. Data b => b -> b) -> NestedFlag -> NestedFlag
gmapT :: (forall b. Data b => b -> b) -> NestedFlag -> NestedFlag
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NestedFlag -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NestedFlag -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NestedFlag -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NestedFlag -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> NestedFlag -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> NestedFlag -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NestedFlag -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NestedFlag -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NestedFlag -> m NestedFlag
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NestedFlag -> m NestedFlag
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NestedFlag -> m NestedFlag
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NestedFlag -> m NestedFlag
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NestedFlag -> m NestedFlag
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NestedFlag -> m NestedFlag
Data, NestedFlag -> NestedFlag -> Bool
(NestedFlag -> NestedFlag -> Bool)
-> (NestedFlag -> NestedFlag -> Bool) -> Eq NestedFlag
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NestedFlag -> NestedFlag -> Bool
== :: NestedFlag -> NestedFlag -> Bool
$c/= :: NestedFlag -> NestedFlag -> Bool
/= :: NestedFlag -> NestedFlag -> Bool
Eq, (forall x. NestedFlag -> Rep NestedFlag x)
-> (forall x. Rep NestedFlag x -> NestedFlag) -> Generic NestedFlag
forall x. Rep NestedFlag x -> NestedFlag
forall x. NestedFlag -> Rep NestedFlag x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. NestedFlag -> Rep NestedFlag x
from :: forall x. NestedFlag -> Rep NestedFlag x
$cto :: forall x. Rep NestedFlag x -> NestedFlag
to :: forall x. Rep NestedFlag x -> NestedFlag
Generic, Eq NestedFlag
Eq NestedFlag =>
(NestedFlag -> NestedFlag -> Ordering)
-> (NestedFlag -> NestedFlag -> Bool)
-> (NestedFlag -> NestedFlag -> Bool)
-> (NestedFlag -> NestedFlag -> Bool)
-> (NestedFlag -> NestedFlag -> Bool)
-> (NestedFlag -> NestedFlag -> NestedFlag)
-> (NestedFlag -> NestedFlag -> NestedFlag)
-> Ord NestedFlag
NestedFlag -> NestedFlag -> Bool
NestedFlag -> NestedFlag -> Ordering
NestedFlag -> NestedFlag -> NestedFlag
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: NestedFlag -> NestedFlag -> Ordering
compare :: NestedFlag -> NestedFlag -> Ordering
$c< :: NestedFlag -> NestedFlag -> Bool
< :: NestedFlag -> NestedFlag -> Bool
$c<= :: NestedFlag -> NestedFlag -> Bool
<= :: NestedFlag -> NestedFlag -> Bool
$c> :: NestedFlag -> NestedFlag -> Bool
> :: NestedFlag -> NestedFlag -> Bool
$c>= :: NestedFlag -> NestedFlag -> Bool
>= :: NestedFlag -> NestedFlag -> Bool
$cmax :: NestedFlag -> NestedFlag -> NestedFlag
max :: NestedFlag -> NestedFlag -> NestedFlag
$cmin :: NestedFlag -> NestedFlag -> NestedFlag
min :: NestedFlag -> NestedFlag -> NestedFlag
Ord, Int -> NestedFlag -> ShowS
[NestedFlag] -> ShowS
NestedFlag -> String
(Int -> NestedFlag -> ShowS)
-> (NestedFlag -> String)
-> ([NestedFlag] -> ShowS)
-> Show NestedFlag
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NestedFlag -> ShowS
showsPrec :: Int -> NestedFlag -> ShowS
$cshow :: NestedFlag -> String
show :: NestedFlag -> String
$cshowList :: [NestedFlag] -> ShowS
showList :: [NestedFlag] -> ShowS
Show, Typeable)
instance Wrapped NestedFlag
instance Hashable NestedFlag
instance Pretty NestedFlag where
pretty :: forall ann. NestedFlag -> Doc ann
pretty = Bool -> Doc ann
forall ann. Bool -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (Bool -> Doc ann) -> (NestedFlag -> Bool) -> NestedFlag -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped NestedFlag -> NestedFlag)
-> NestedFlag -> Unwrapped NestedFlag
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op Bool -> NestedFlag
Unwrapped NestedFlag -> NestedFlag
NestedFlag
$(ATH.deriveJSON ATH.defaultOptions ''NestedFlag)
data Hashed
data Unhashed
data V4Sig
data V6Sig
data ByteRange
= ByteRange
{ ByteRange -> Int64
_rangeOffset :: Int64
, ByteRange -> Int64
_rangeLength :: Int64
}
deriving (Typeable ByteRange
Typeable ByteRange =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ByteRange -> c ByteRange)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ByteRange)
-> (ByteRange -> Constr)
-> (ByteRange -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ByteRange))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteRange))
-> ((forall b. Data b => b -> b) -> ByteRange -> ByteRange)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ByteRange -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ByteRange -> r)
-> (forall u. (forall d. Data d => d -> u) -> ByteRange -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> ByteRange -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ByteRange -> m ByteRange)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ByteRange -> m ByteRange)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ByteRange -> m ByteRange)
-> Data ByteRange
ByteRange -> Constr
ByteRange -> DataType
(forall b. Data b => b -> b) -> ByteRange -> ByteRange
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ByteRange -> u
forall u. (forall d. Data d => d -> u) -> ByteRange -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ByteRange -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ByteRange -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ByteRange -> m ByteRange
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ByteRange -> m ByteRange
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ByteRange
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ByteRange -> c ByteRange
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ByteRange)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteRange)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ByteRange -> c ByteRange
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ByteRange -> c ByteRange
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ByteRange
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ByteRange
$ctoConstr :: ByteRange -> Constr
toConstr :: ByteRange -> Constr
$cdataTypeOf :: ByteRange -> DataType
dataTypeOf :: ByteRange -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ByteRange)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ByteRange)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteRange)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteRange)
$cgmapT :: (forall b. Data b => b -> b) -> ByteRange -> ByteRange
gmapT :: (forall b. Data b => b -> b) -> ByteRange -> ByteRange
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ByteRange -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ByteRange -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ByteRange -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ByteRange -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ByteRange -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> ByteRange -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ByteRange -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ByteRange -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ByteRange -> m ByteRange
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ByteRange -> m ByteRange
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ByteRange -> m ByteRange
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ByteRange -> m ByteRange
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ByteRange -> m ByteRange
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ByteRange -> m ByteRange
Data, ByteRange -> ByteRange -> Bool
(ByteRange -> ByteRange -> Bool)
-> (ByteRange -> ByteRange -> Bool) -> Eq ByteRange
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ByteRange -> ByteRange -> Bool
== :: ByteRange -> ByteRange -> Bool
$c/= :: ByteRange -> ByteRange -> Bool
/= :: ByteRange -> ByteRange -> Bool
Eq, (forall x. ByteRange -> Rep ByteRange x)
-> (forall x. Rep ByteRange x -> ByteRange) -> Generic ByteRange
forall x. Rep ByteRange x -> ByteRange
forall x. ByteRange -> Rep ByteRange x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. ByteRange -> Rep ByteRange x
from :: forall x. ByteRange -> Rep ByteRange x
$cto :: forall x. Rep ByteRange x -> ByteRange
to :: forall x. Rep ByteRange x -> ByteRange
Generic, Eq ByteRange
Eq ByteRange =>
(ByteRange -> ByteRange -> Ordering)
-> (ByteRange -> ByteRange -> Bool)
-> (ByteRange -> ByteRange -> Bool)
-> (ByteRange -> ByteRange -> Bool)
-> (ByteRange -> ByteRange -> Bool)
-> (ByteRange -> ByteRange -> ByteRange)
-> (ByteRange -> ByteRange -> ByteRange)
-> Ord ByteRange
ByteRange -> ByteRange -> Bool
ByteRange -> ByteRange -> Ordering
ByteRange -> ByteRange -> ByteRange
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: ByteRange -> ByteRange -> Ordering
compare :: ByteRange -> ByteRange -> Ordering
$c< :: ByteRange -> ByteRange -> Bool
< :: ByteRange -> ByteRange -> Bool
$c<= :: ByteRange -> ByteRange -> Bool
<= :: ByteRange -> ByteRange -> Bool
$c> :: ByteRange -> ByteRange -> Bool
> :: ByteRange -> ByteRange -> Bool
$c>= :: ByteRange -> ByteRange -> Bool
>= :: ByteRange -> ByteRange -> Bool
$cmax :: ByteRange -> ByteRange -> ByteRange
max :: ByteRange -> ByteRange -> ByteRange
$cmin :: ByteRange -> ByteRange -> ByteRange
min :: ByteRange -> ByteRange -> ByteRange
Ord, Int -> ByteRange -> ShowS
[ByteRange] -> ShowS
ByteRange -> String
(Int -> ByteRange -> ShowS)
-> (ByteRange -> String)
-> ([ByteRange] -> ShowS)
-> Show ByteRange
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ByteRange -> ShowS
showsPrec :: Int -> ByteRange -> ShowS
$cshow :: ByteRange -> String
show :: ByteRange -> String
$cshowList :: [ByteRange] -> ShowS
showList :: [ByteRange] -> ShowS
Show, Typeable)
data WireRepRef
= WireRepRef
{ WireRepRef -> Int64
_wireRepLength :: Int64
, WireRepRef -> Maybe Text
_wireRepName :: Maybe Text
, WireRepRef -> Bool
_wireRepWasOriginallyArmored :: Bool
}
deriving (Typeable WireRepRef
Typeable WireRepRef =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WireRepRef -> c WireRepRef)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WireRepRef)
-> (WireRepRef -> Constr)
-> (WireRepRef -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c WireRepRef))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c WireRepRef))
-> ((forall b. Data b => b -> b) -> WireRepRef -> WireRepRef)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> WireRepRef -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> WireRepRef -> r)
-> (forall u. (forall d. Data d => d -> u) -> WireRepRef -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> WireRepRef -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> WireRepRef -> m WireRepRef)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> WireRepRef -> m WireRepRef)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> WireRepRef -> m WireRepRef)
-> Data WireRepRef
WireRepRef -> Constr
WireRepRef -> DataType
(forall b. Data b => b -> b) -> WireRepRef -> WireRepRef
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> WireRepRef -> u
forall u. (forall d. Data d => d -> u) -> WireRepRef -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> WireRepRef -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> WireRepRef -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> WireRepRef -> m WireRepRef
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> WireRepRef -> m WireRepRef
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WireRepRef
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WireRepRef -> c WireRepRef
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c WireRepRef)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WireRepRef)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WireRepRef -> c WireRepRef
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WireRepRef -> c WireRepRef
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WireRepRef
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WireRepRef
$ctoConstr :: WireRepRef -> Constr
toConstr :: WireRepRef -> Constr
$cdataTypeOf :: WireRepRef -> DataType
dataTypeOf :: WireRepRef -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c WireRepRef)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c WireRepRef)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WireRepRef)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WireRepRef)
$cgmapT :: (forall b. Data b => b -> b) -> WireRepRef -> WireRepRef
gmapT :: (forall b. Data b => b -> b) -> WireRepRef -> WireRepRef
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> WireRepRef -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> WireRepRef -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> WireRepRef -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> WireRepRef -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> WireRepRef -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> WireRepRef -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> WireRepRef -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> WireRepRef -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> WireRepRef -> m WireRepRef
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> WireRepRef -> m WireRepRef
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> WireRepRef -> m WireRepRef
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> WireRepRef -> m WireRepRef
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> WireRepRef -> m WireRepRef
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> WireRepRef -> m WireRepRef
Data, WireRepRef -> WireRepRef -> Bool
(WireRepRef -> WireRepRef -> Bool)
-> (WireRepRef -> WireRepRef -> Bool) -> Eq WireRepRef
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WireRepRef -> WireRepRef -> Bool
== :: WireRepRef -> WireRepRef -> Bool
$c/= :: WireRepRef -> WireRepRef -> Bool
/= :: WireRepRef -> WireRepRef -> Bool
Eq, (forall x. WireRepRef -> Rep WireRepRef x)
-> (forall x. Rep WireRepRef x -> WireRepRef) -> Generic WireRepRef
forall x. Rep WireRepRef x -> WireRepRef
forall x. WireRepRef -> Rep WireRepRef x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. WireRepRef -> Rep WireRepRef x
from :: forall x. WireRepRef -> Rep WireRepRef x
$cto :: forall x. Rep WireRepRef x -> WireRepRef
to :: forall x. Rep WireRepRef x -> WireRepRef
Generic, Eq WireRepRef
Eq WireRepRef =>
(WireRepRef -> WireRepRef -> Ordering)
-> (WireRepRef -> WireRepRef -> Bool)
-> (WireRepRef -> WireRepRef -> Bool)
-> (WireRepRef -> WireRepRef -> Bool)
-> (WireRepRef -> WireRepRef -> Bool)
-> (WireRepRef -> WireRepRef -> WireRepRef)
-> (WireRepRef -> WireRepRef -> WireRepRef)
-> Ord WireRepRef
WireRepRef -> WireRepRef -> Bool
WireRepRef -> WireRepRef -> Ordering
WireRepRef -> WireRepRef -> WireRepRef
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: WireRepRef -> WireRepRef -> Ordering
compare :: WireRepRef -> WireRepRef -> Ordering
$c< :: WireRepRef -> WireRepRef -> Bool
< :: WireRepRef -> WireRepRef -> Bool
$c<= :: WireRepRef -> WireRepRef -> Bool
<= :: WireRepRef -> WireRepRef -> Bool
$c> :: WireRepRef -> WireRepRef -> Bool
> :: WireRepRef -> WireRepRef -> Bool
$c>= :: WireRepRef -> WireRepRef -> Bool
>= :: WireRepRef -> WireRepRef -> Bool
$cmax :: WireRepRef -> WireRepRef -> WireRepRef
max :: WireRepRef -> WireRepRef -> WireRepRef
$cmin :: WireRepRef -> WireRepRef -> WireRepRef
min :: WireRepRef -> WireRepRef -> WireRepRef
Ord, Int -> WireRepRef -> ShowS
[WireRepRef] -> ShowS
WireRepRef -> String
(Int -> WireRepRef -> ShowS)
-> (WireRepRef -> String)
-> ([WireRepRef] -> ShowS)
-> Show WireRepRef
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WireRepRef -> ShowS
showsPrec :: Int -> WireRepRef -> ShowS
$cshow :: WireRepRef -> String
show :: WireRepRef -> String
$cshowList :: [WireRepRef] -> ShowS
showList :: [WireRepRef] -> ShowS
Show, Typeable)
type WireRepRefs = NonEmpty WireRepRef
wireRepRef :: ByteString -> WireRepRef
wireRepRef :: ByteString -> WireRepRef
wireRepRef = Maybe Text -> Bool -> Int64 -> WireRepRef
mkWireRepRefWithLength Maybe Text
forall a. Maybe a
Nothing Bool
False (Int64 -> WireRepRef)
-> (ByteString -> Int64) -> ByteString -> WireRepRef
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> Int64
BL.length
namedWireRepRef :: Text -> ByteString -> WireRepRef
namedWireRepRef :: Text -> ByteString -> WireRepRef
namedWireRepRef Text
name = Maybe Text -> Bool -> Int64 -> WireRepRef
mkWireRepRefWithLength (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
name) Bool
False (Int64 -> WireRepRef)
-> (ByteString -> Int64) -> ByteString -> WireRepRef
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> Int64
BL.length
mkWireRepRefWithLength
:: Maybe Text -> Bool -> Int64 -> WireRepRef
mkWireRepRefWithLength :: Maybe Text -> Bool -> Int64 -> WireRepRef
mkWireRepRefWithLength Maybe Text
mname Bool
wasOriginallyArmored Int64
payloadLen =
WireRepRef
{ _wireRepLength :: Int64
_wireRepLength = Int64
payloadLen
, _wireRepName :: Maybe Text
_wireRepName = Maybe Text
mname
, _wireRepWasOriginallyArmored :: Bool
_wireRepWasOriginallyArmored = Bool
wasOriginallyArmored
}
mkWireRepRef :: Maybe Text -> Bool -> ByteString -> WireRepRef
mkWireRepRef :: Maybe Text -> Bool -> ByteString -> WireRepRef
mkWireRepRef Maybe Text
mname Bool
wasOriginallyArmored =
Maybe Text -> Bool -> Int64 -> WireRepRef
mkWireRepRefWithLength Maybe Text
mname Bool
wasOriginallyArmored (Int64 -> WireRepRef)
-> (ByteString -> Int64) -> ByteString -> WireRepRef
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> Int64
BL.length
rangeEnd :: ByteRange -> Int64
rangeEnd :: ByteRange -> Int64
rangeEnd ByteRange
r = ByteRange -> Int64
_rangeOffset ByteRange
r Int64 -> Int64 -> Int64
forall a. Num a => a -> a -> a
+ ByteRange -> Int64
_rangeLength ByteRange
r
spanByteRanges :: [ByteRange] -> Maybe ByteRange
spanByteRanges :: [ByteRange] -> Maybe ByteRange
spanByteRanges [] = Maybe ByteRange
forall a. Maybe a
Nothing
spanByteRanges (ByteRange
r : [ByteRange]
rs) =
let start :: Int64
start = [Int64] -> Int64
forall a. Ord a => [a] -> a
forall (t :: * -> *) a. (Foldable t, Ord a) => t a -> a
minimum (ByteRange -> Int64
_rangeOffset (ByteRange -> Int64) -> [ByteRange] -> [Int64]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ByteRange
r ByteRange -> [ByteRange] -> [ByteRange]
forall a. a -> [a] -> [a]
: [ByteRange]
rs))
ending :: Int64
ending = [Int64] -> Int64
forall a. Ord a => [a] -> a
forall (t :: * -> *) a. (Foldable t, Ord a) => t a -> a
maximum (ByteRange -> Int64
rangeEnd (ByteRange -> Int64) -> [ByteRange] -> [Int64]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ByteRange
r ByteRange -> [ByteRange] -> [ByteRange]
forall a. a -> [a] -> [a]
: [ByteRange]
rs))
in ByteRange -> Maybe ByteRange
forall a. a -> Maybe a
Just (Int64 -> Int64 -> ByteRange
ByteRange Int64
start (Int64
ending Int64 -> Int64 -> Int64
forall a. Num a => a -> a -> a
- Int64
start))
$(makeLenses ''ByteRange)
$(makeLenses ''WireRepRef)
class
(Eq a, Ord a) =>
FutureFlag a
where
fromFFlag :: a -> Int
toFFlag :: Int -> a
class
(Eq a, Ord a) =>
FutureVal a
where
fromFVal :: a -> Word8
toFVal :: Word8 -> a
data SymmetricAlgorithm
= Plaintext
| IDEA
| TripleDES
| CAST5
| Blowfish
| ReservedSAFER
| ReservedDES
| AES128
| AES192
| AES256
| Twofish
| Camellia128
| Camellia192
| Camellia256
| OtherSA Word8
deriving (Typeable SymmetricAlgorithm
Typeable SymmetricAlgorithm =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SymmetricAlgorithm
-> c SymmetricAlgorithm)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymmetricAlgorithm)
-> (SymmetricAlgorithm -> Constr)
-> (SymmetricAlgorithm -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SymmetricAlgorithm))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SymmetricAlgorithm))
-> ((forall b. Data b => b -> b)
-> SymmetricAlgorithm -> SymmetricAlgorithm)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymmetricAlgorithm -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SymmetricAlgorithm -> r)
-> (forall u.
(forall d. Data d => d -> u) -> SymmetricAlgorithm -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> SymmetricAlgorithm -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SymmetricAlgorithm -> m SymmetricAlgorithm)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SymmetricAlgorithm -> m SymmetricAlgorithm)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SymmetricAlgorithm -> m SymmetricAlgorithm)
-> Data SymmetricAlgorithm
SymmetricAlgorithm -> Constr
SymmetricAlgorithm -> DataType
(forall b. Data b => b -> b)
-> SymmetricAlgorithm -> SymmetricAlgorithm
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> SymmetricAlgorithm -> u
forall u. (forall d. Data d => d -> u) -> SymmetricAlgorithm -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymmetricAlgorithm -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SymmetricAlgorithm -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SymmetricAlgorithm -> m SymmetricAlgorithm
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SymmetricAlgorithm -> m SymmetricAlgorithm
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymmetricAlgorithm
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SymmetricAlgorithm
-> c SymmetricAlgorithm
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SymmetricAlgorithm)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SymmetricAlgorithm)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SymmetricAlgorithm
-> c SymmetricAlgorithm
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SymmetricAlgorithm
-> c SymmetricAlgorithm
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymmetricAlgorithm
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymmetricAlgorithm
$ctoConstr :: SymmetricAlgorithm -> Constr
toConstr :: SymmetricAlgorithm -> Constr
$cdataTypeOf :: SymmetricAlgorithm -> DataType
dataTypeOf :: SymmetricAlgorithm -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SymmetricAlgorithm)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SymmetricAlgorithm)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SymmetricAlgorithm)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SymmetricAlgorithm)
$cgmapT :: (forall b. Data b => b -> b)
-> SymmetricAlgorithm -> SymmetricAlgorithm
gmapT :: (forall b. Data b => b -> b)
-> SymmetricAlgorithm -> SymmetricAlgorithm
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymmetricAlgorithm -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymmetricAlgorithm -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SymmetricAlgorithm -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SymmetricAlgorithm -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SymmetricAlgorithm -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> SymmetricAlgorithm -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SymmetricAlgorithm -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SymmetricAlgorithm -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SymmetricAlgorithm -> m SymmetricAlgorithm
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SymmetricAlgorithm -> m SymmetricAlgorithm
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SymmetricAlgorithm -> m SymmetricAlgorithm
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SymmetricAlgorithm -> m SymmetricAlgorithm
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SymmetricAlgorithm -> m SymmetricAlgorithm
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SymmetricAlgorithm -> m SymmetricAlgorithm
Data, (forall x. SymmetricAlgorithm -> Rep SymmetricAlgorithm x)
-> (forall x. Rep SymmetricAlgorithm x -> SymmetricAlgorithm)
-> Generic SymmetricAlgorithm
forall x. Rep SymmetricAlgorithm x -> SymmetricAlgorithm
forall x. SymmetricAlgorithm -> Rep SymmetricAlgorithm x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SymmetricAlgorithm -> Rep SymmetricAlgorithm x
from :: forall x. SymmetricAlgorithm -> Rep SymmetricAlgorithm x
$cto :: forall x. Rep SymmetricAlgorithm x -> SymmetricAlgorithm
to :: forall x. Rep SymmetricAlgorithm x -> SymmetricAlgorithm
Generic, Int -> SymmetricAlgorithm -> ShowS
[SymmetricAlgorithm] -> ShowS
SymmetricAlgorithm -> String
(Int -> SymmetricAlgorithm -> ShowS)
-> (SymmetricAlgorithm -> String)
-> ([SymmetricAlgorithm] -> ShowS)
-> Show SymmetricAlgorithm
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SymmetricAlgorithm -> ShowS
showsPrec :: Int -> SymmetricAlgorithm -> ShowS
$cshow :: SymmetricAlgorithm -> String
show :: SymmetricAlgorithm -> String
$cshowList :: [SymmetricAlgorithm] -> ShowS
showList :: [SymmetricAlgorithm] -> ShowS
Show, Typeable)
instance Eq SymmetricAlgorithm where
== :: SymmetricAlgorithm -> SymmetricAlgorithm -> Bool
(==) SymmetricAlgorithm
a SymmetricAlgorithm
b = SymmetricAlgorithm -> Word8
forall a. FutureVal a => a -> Word8
fromFVal SymmetricAlgorithm
a Word8 -> Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== SymmetricAlgorithm -> Word8
forall a. FutureVal a => a -> Word8
fromFVal SymmetricAlgorithm
b
instance Ord SymmetricAlgorithm where
compare :: SymmetricAlgorithm -> SymmetricAlgorithm -> Ordering
compare = (SymmetricAlgorithm -> Word8)
-> SymmetricAlgorithm -> SymmetricAlgorithm -> Ordering
forall a b. Ord a => (b -> a) -> b -> b -> Ordering
comparing SymmetricAlgorithm -> Word8
forall a. FutureVal a => a -> Word8
fromFVal
instance FutureVal SymmetricAlgorithm where
fromFVal :: SymmetricAlgorithm -> Word8
fromFVal SymmetricAlgorithm
Plaintext = Word8
0
fromFVal SymmetricAlgorithm
IDEA = Word8
1
fromFVal SymmetricAlgorithm
TripleDES = Word8
2
fromFVal SymmetricAlgorithm
CAST5 = Word8
3
fromFVal SymmetricAlgorithm
Blowfish = Word8
4
fromFVal SymmetricAlgorithm
ReservedSAFER = Word8
5
fromFVal SymmetricAlgorithm
ReservedDES = Word8
6
fromFVal SymmetricAlgorithm
AES128 = Word8
7
fromFVal SymmetricAlgorithm
AES192 = Word8
8
fromFVal SymmetricAlgorithm
AES256 = Word8
9
fromFVal SymmetricAlgorithm
Twofish = Word8
10
fromFVal SymmetricAlgorithm
Camellia128 = Word8
11
fromFVal SymmetricAlgorithm
Camellia192 = Word8
12
fromFVal SymmetricAlgorithm
Camellia256 = Word8
13
fromFVal (OtherSA Word8
o) = Word8
o
toFVal :: Word8 -> SymmetricAlgorithm
toFVal Word8
0 = SymmetricAlgorithm
Plaintext
toFVal Word8
1 = SymmetricAlgorithm
IDEA
toFVal Word8
2 = SymmetricAlgorithm
TripleDES
toFVal Word8
3 = SymmetricAlgorithm
CAST5
toFVal Word8
4 = SymmetricAlgorithm
Blowfish
toFVal Word8
5 = SymmetricAlgorithm
ReservedSAFER
toFVal Word8
6 = SymmetricAlgorithm
ReservedDES
toFVal Word8
7 = SymmetricAlgorithm
AES128
toFVal Word8
8 = SymmetricAlgorithm
AES192
toFVal Word8
9 = SymmetricAlgorithm
AES256
toFVal Word8
10 = SymmetricAlgorithm
Twofish
toFVal Word8
11 = SymmetricAlgorithm
Camellia128
toFVal Word8
12 = SymmetricAlgorithm
Camellia192
toFVal Word8
13 = SymmetricAlgorithm
Camellia256
toFVal Word8
o = Word8 -> SymmetricAlgorithm
OtherSA Word8
o
instance Hashable SymmetricAlgorithm
instance Pretty SymmetricAlgorithm where
pretty :: forall ann. SymmetricAlgorithm -> Doc ann
pretty SymmetricAlgorithm
Plaintext = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"plaintext"
pretty SymmetricAlgorithm
IDEA = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"IDEA"
pretty SymmetricAlgorithm
TripleDES = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"3DES"
pretty SymmetricAlgorithm
CAST5 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"CAST-128"
pretty SymmetricAlgorithm
Blowfish = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"Blowfish"
pretty SymmetricAlgorithm
ReservedSAFER = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"(reserved) SAFER"
pretty SymmetricAlgorithm
ReservedDES = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"(reserved) DES"
pretty SymmetricAlgorithm
AES128 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"AES-128"
pretty SymmetricAlgorithm
AES192 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"AES-192"
pretty SymmetricAlgorithm
AES256 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"AES-256"
pretty SymmetricAlgorithm
Twofish = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"Twofish"
pretty SymmetricAlgorithm
Camellia128 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"Camellia-128"
pretty SymmetricAlgorithm
Camellia192 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"Camellia-192"
pretty SymmetricAlgorithm
Camellia256 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"Camellia-256"
pretty (OtherSA Word8
sa) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"unknown symmetric algorithm" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
sa
$(ATH.deriveJSON ATH.defaultOptions ''SymmetricAlgorithm)
data NotationFlag
= HumanReadable
| OtherNF Word8
deriving (Typeable NotationFlag
Typeable NotationFlag =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotationFlag -> c NotationFlag)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotationFlag)
-> (NotationFlag -> Constr)
-> (NotationFlag -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotationFlag))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NotationFlag))
-> ((forall b. Data b => b -> b) -> NotationFlag -> NotationFlag)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotationFlag -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NotationFlag -> r)
-> (forall u. (forall d. Data d => d -> u) -> NotationFlag -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> NotationFlag -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotationFlag -> m NotationFlag)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationFlag -> m NotationFlag)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationFlag -> m NotationFlag)
-> Data NotationFlag
NotationFlag -> Constr
NotationFlag -> DataType
(forall b. Data b => b -> b) -> NotationFlag -> NotationFlag
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> NotationFlag -> u
forall u. (forall d. Data d => d -> u) -> NotationFlag -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotationFlag -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NotationFlag -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotationFlag -> m NotationFlag
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationFlag -> m NotationFlag
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotationFlag
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotationFlag -> c NotationFlag
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotationFlag)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NotationFlag)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotationFlag -> c NotationFlag
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotationFlag -> c NotationFlag
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotationFlag
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotationFlag
$ctoConstr :: NotationFlag -> Constr
toConstr :: NotationFlag -> Constr
$cdataTypeOf :: NotationFlag -> DataType
dataTypeOf :: NotationFlag -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotationFlag)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotationFlag)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NotationFlag)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NotationFlag)
$cgmapT :: (forall b. Data b => b -> b) -> NotationFlag -> NotationFlag
gmapT :: (forall b. Data b => b -> b) -> NotationFlag -> NotationFlag
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotationFlag -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotationFlag -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NotationFlag -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NotationFlag -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> NotationFlag -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> NotationFlag -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NotationFlag -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NotationFlag -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotationFlag -> m NotationFlag
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotationFlag -> m NotationFlag
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationFlag -> m NotationFlag
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationFlag -> m NotationFlag
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationFlag -> m NotationFlag
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationFlag -> m NotationFlag
Data, (forall x. NotationFlag -> Rep NotationFlag x)
-> (forall x. Rep NotationFlag x -> NotationFlag)
-> Generic NotationFlag
forall x. Rep NotationFlag x -> NotationFlag
forall x. NotationFlag -> Rep NotationFlag x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. NotationFlag -> Rep NotationFlag x
from :: forall x. NotationFlag -> Rep NotationFlag x
$cto :: forall x. Rep NotationFlag x -> NotationFlag
to :: forall x. Rep NotationFlag x -> NotationFlag
Generic, Int -> NotationFlag -> ShowS
[NotationFlag] -> ShowS
NotationFlag -> String
(Int -> NotationFlag -> ShowS)
-> (NotationFlag -> String)
-> ([NotationFlag] -> ShowS)
-> Show NotationFlag
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NotationFlag -> ShowS
showsPrec :: Int -> NotationFlag -> ShowS
$cshow :: NotationFlag -> String
show :: NotationFlag -> String
$cshowList :: [NotationFlag] -> ShowS
showList :: [NotationFlag] -> ShowS
Show, Typeable)
mkNotationFlag :: Word8 -> NotationFlag
mkNotationFlag :: Word8 -> NotationFlag
mkNotationFlag Word8
o
| Word8
o' Word8 -> Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== Word8
0 = NotationFlag
HumanReadable
| Bool
otherwise = Word8 -> NotationFlag
OtherNF Word8
o'
where
o' :: Word8
o' = Word8
o Word8 -> Word8 -> Word8
forall a. Bits a => a -> a -> a
.&. Word8
0x0f
instance Eq NotationFlag where
== :: NotationFlag -> NotationFlag -> Bool
(==) NotationFlag
a NotationFlag
b = NotationFlag -> Int
forall a. FutureFlag a => a -> Int
fromFFlag NotationFlag
a Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== NotationFlag -> Int
forall a. FutureFlag a => a -> Int
fromFFlag NotationFlag
b
instance Ord NotationFlag where
compare :: NotationFlag -> NotationFlag -> Ordering
compare = (NotationFlag -> Int) -> NotationFlag -> NotationFlag -> Ordering
forall a b. Ord a => (b -> a) -> b -> b -> Ordering
comparing NotationFlag -> Int
forall a. FutureFlag a => a -> Int
fromFFlag
instance FutureFlag NotationFlag where
fromFFlag :: NotationFlag -> Int
fromFFlag NotationFlag
HumanReadable = Int
0
fromFFlag (OtherNF Word8
o) = Word8 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word8
o Word8 -> Word8 -> Word8
forall a. Bits a => a -> a -> a
.&. Word8
0x0f)
toFFlag :: Int -> NotationFlag
toFFlag Int
0 = NotationFlag
HumanReadable
toFFlag Int
o = Word8 -> NotationFlag
mkNotationFlag (Int -> Word8
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
o)
instance Hashable NotationFlag
instance Pretty NotationFlag where
pretty :: forall ann. NotationFlag -> Doc ann
pretty NotationFlag
HumanReadable = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"human-readable"
pretty (OtherNF Word8
o) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"unknown notation flag type" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
o
$(ATH.deriveJSON ATH.defaultOptions ''NotationFlag)
newtype ThirtyTwoBitTimeStamp
= ThirtyTwoBitTimeStamp
{ ThirtyTwoBitTimeStamp -> Word32
unThirtyTwoBitTimeStamp :: Word32
}
deriving
( ThirtyTwoBitTimeStamp
ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> Bounded ThirtyTwoBitTimeStamp
forall a. a -> a -> Bounded a
$cminBound :: ThirtyTwoBitTimeStamp
minBound :: ThirtyTwoBitTimeStamp
$cmaxBound :: ThirtyTwoBitTimeStamp
maxBound :: ThirtyTwoBitTimeStamp
Bounded
, Typeable ThirtyTwoBitTimeStamp
Typeable ThirtyTwoBitTimeStamp =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ThirtyTwoBitTimeStamp
-> c ThirtyTwoBitTimeStamp)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ThirtyTwoBitTimeStamp)
-> (ThirtyTwoBitTimeStamp -> Constr)
-> (ThirtyTwoBitTimeStamp -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ThirtyTwoBitTimeStamp))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ThirtyTwoBitTimeStamp))
-> ((forall b. Data b => b -> b)
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp)
-> (forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> ThirtyTwoBitTimeStamp
-> r)
-> (forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> ThirtyTwoBitTimeStamp
-> r)
-> (forall u.
(forall d. Data d => d -> u) -> ThirtyTwoBitTimeStamp -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> ThirtyTwoBitTimeStamp -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitTimeStamp -> m ThirtyTwoBitTimeStamp)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitTimeStamp -> m ThirtyTwoBitTimeStamp)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitTimeStamp -> m ThirtyTwoBitTimeStamp)
-> Data ThirtyTwoBitTimeStamp
ThirtyTwoBitTimeStamp -> Constr
ThirtyTwoBitTimeStamp -> DataType
(forall b. Data b => b -> b)
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> ThirtyTwoBitTimeStamp -> u
forall u.
(forall d. Data d => d -> u) -> ThirtyTwoBitTimeStamp -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ThirtyTwoBitTimeStamp -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ThirtyTwoBitTimeStamp -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitTimeStamp -> m ThirtyTwoBitTimeStamp
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitTimeStamp -> m ThirtyTwoBitTimeStamp
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ThirtyTwoBitTimeStamp
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ThirtyTwoBitTimeStamp
-> c ThirtyTwoBitTimeStamp
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ThirtyTwoBitTimeStamp)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ThirtyTwoBitTimeStamp)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ThirtyTwoBitTimeStamp
-> c ThirtyTwoBitTimeStamp
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ThirtyTwoBitTimeStamp
-> c ThirtyTwoBitTimeStamp
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ThirtyTwoBitTimeStamp
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ThirtyTwoBitTimeStamp
$ctoConstr :: ThirtyTwoBitTimeStamp -> Constr
toConstr :: ThirtyTwoBitTimeStamp -> Constr
$cdataTypeOf :: ThirtyTwoBitTimeStamp -> DataType
dataTypeOf :: ThirtyTwoBitTimeStamp -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ThirtyTwoBitTimeStamp)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ThirtyTwoBitTimeStamp)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ThirtyTwoBitTimeStamp)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ThirtyTwoBitTimeStamp)
$cgmapT :: (forall b. Data b => b -> b)
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
gmapT :: (forall b. Data b => b -> b)
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ThirtyTwoBitTimeStamp -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ThirtyTwoBitTimeStamp -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ThirtyTwoBitTimeStamp -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ThirtyTwoBitTimeStamp -> r
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> ThirtyTwoBitTimeStamp -> [u]
gmapQ :: forall u.
(forall d. Data d => d -> u) -> ThirtyTwoBitTimeStamp -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ThirtyTwoBitTimeStamp -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ThirtyTwoBitTimeStamp -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitTimeStamp -> m ThirtyTwoBitTimeStamp
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitTimeStamp -> m ThirtyTwoBitTimeStamp
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitTimeStamp -> m ThirtyTwoBitTimeStamp
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitTimeStamp -> m ThirtyTwoBitTimeStamp
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitTimeStamp -> m ThirtyTwoBitTimeStamp
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitTimeStamp -> m ThirtyTwoBitTimeStamp
Data
, Int -> ThirtyTwoBitTimeStamp
ThirtyTwoBitTimeStamp -> Int
ThirtyTwoBitTimeStamp -> [ThirtyTwoBitTimeStamp]
ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> [ThirtyTwoBitTimeStamp]
ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> [ThirtyTwoBitTimeStamp]
(ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp)
-> (ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp)
-> (Int -> ThirtyTwoBitTimeStamp)
-> (ThirtyTwoBitTimeStamp -> Int)
-> (ThirtyTwoBitTimeStamp -> [ThirtyTwoBitTimeStamp])
-> (ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> [ThirtyTwoBitTimeStamp])
-> (ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> [ThirtyTwoBitTimeStamp])
-> (ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> [ThirtyTwoBitTimeStamp])
-> Enum ThirtyTwoBitTimeStamp
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
succ :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$cpred :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
pred :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$ctoEnum :: Int -> ThirtyTwoBitTimeStamp
toEnum :: Int -> ThirtyTwoBitTimeStamp
$cfromEnum :: ThirtyTwoBitTimeStamp -> Int
fromEnum :: ThirtyTwoBitTimeStamp -> Int
$cenumFrom :: ThirtyTwoBitTimeStamp -> [ThirtyTwoBitTimeStamp]
enumFrom :: ThirtyTwoBitTimeStamp -> [ThirtyTwoBitTimeStamp]
$cenumFromThen :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> [ThirtyTwoBitTimeStamp]
enumFromThen :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> [ThirtyTwoBitTimeStamp]
$cenumFromTo :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> [ThirtyTwoBitTimeStamp]
enumFromTo :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> [ThirtyTwoBitTimeStamp]
$cenumFromThenTo :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> [ThirtyTwoBitTimeStamp]
enumFromThenTo :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> [ThirtyTwoBitTimeStamp]
Enum
, ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool
(ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool)
-> (ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool)
-> Eq ThirtyTwoBitTimeStamp
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool
== :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool
$c/= :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool
/= :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool
Eq
, (forall x. ThirtyTwoBitTimeStamp -> Rep ThirtyTwoBitTimeStamp x)
-> (forall x. Rep ThirtyTwoBitTimeStamp x -> ThirtyTwoBitTimeStamp)
-> Generic ThirtyTwoBitTimeStamp
forall x. Rep ThirtyTwoBitTimeStamp x -> ThirtyTwoBitTimeStamp
forall x. ThirtyTwoBitTimeStamp -> Rep ThirtyTwoBitTimeStamp x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. ThirtyTwoBitTimeStamp -> Rep ThirtyTwoBitTimeStamp x
from :: forall x. ThirtyTwoBitTimeStamp -> Rep ThirtyTwoBitTimeStamp x
$cto :: forall x. Rep ThirtyTwoBitTimeStamp x -> ThirtyTwoBitTimeStamp
to :: forall x. Rep ThirtyTwoBitTimeStamp x -> ThirtyTwoBitTimeStamp
Generic
, Eq ThirtyTwoBitTimeStamp
Eq ThirtyTwoBitTimeStamp =>
(Int -> ThirtyTwoBitTimeStamp -> Int)
-> (ThirtyTwoBitTimeStamp -> Int) -> Hashable ThirtyTwoBitTimeStamp
Int -> ThirtyTwoBitTimeStamp -> Int
ThirtyTwoBitTimeStamp -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> ThirtyTwoBitTimeStamp -> Int
hashWithSalt :: Int -> ThirtyTwoBitTimeStamp -> Int
$chash :: ThirtyTwoBitTimeStamp -> Int
hash :: ThirtyTwoBitTimeStamp -> Int
Hashable
, Enum ThirtyTwoBitTimeStamp
Real ThirtyTwoBitTimeStamp
(Real ThirtyTwoBitTimeStamp, Enum ThirtyTwoBitTimeStamp) =>
(ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp)
-> (ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp)
-> (ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp)
-> (ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp)
-> (ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> (ThirtyTwoBitTimeStamp, ThirtyTwoBitTimeStamp))
-> (ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> (ThirtyTwoBitTimeStamp, ThirtyTwoBitTimeStamp))
-> (ThirtyTwoBitTimeStamp -> Integer)
-> Integral ThirtyTwoBitTimeStamp
ThirtyTwoBitTimeStamp -> Integer
ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> (ThirtyTwoBitTimeStamp, ThirtyTwoBitTimeStamp)
ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
forall a.
(Real a, Enum a) =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
$cquot :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
quot :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$crem :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
rem :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$cdiv :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
div :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$cmod :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
mod :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$cquotRem :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> (ThirtyTwoBitTimeStamp, ThirtyTwoBitTimeStamp)
quotRem :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> (ThirtyTwoBitTimeStamp, ThirtyTwoBitTimeStamp)
$cdivMod :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> (ThirtyTwoBitTimeStamp, ThirtyTwoBitTimeStamp)
divMod :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> (ThirtyTwoBitTimeStamp, ThirtyTwoBitTimeStamp)
$ctoInteger :: ThirtyTwoBitTimeStamp -> Integer
toInteger :: ThirtyTwoBitTimeStamp -> Integer
Integral
, Integer -> ThirtyTwoBitTimeStamp
ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
(ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp)
-> (ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp)
-> (ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp)
-> (ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp)
-> (ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp)
-> (ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp)
-> (Integer -> ThirtyTwoBitTimeStamp)
-> Num ThirtyTwoBitTimeStamp
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
+ :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$c- :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
- :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$c* :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
* :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$cnegate :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
negate :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$cabs :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
abs :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$csignum :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
signum :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$cfromInteger :: Integer -> ThirtyTwoBitTimeStamp
fromInteger :: Integer -> ThirtyTwoBitTimeStamp
Num
, Eq ThirtyTwoBitTimeStamp
Eq ThirtyTwoBitTimeStamp =>
(ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Ordering)
-> (ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool)
-> (ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool)
-> (ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool)
-> (ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool)
-> (ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp)
-> (ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp)
-> Ord ThirtyTwoBitTimeStamp
ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool
ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Ordering
ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Ordering
compare :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Ordering
$c< :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool
< :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool
$c<= :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool
<= :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool
$c> :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool
> :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool
$c>= :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool
>= :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool
$cmax :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
max :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$cmin :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
min :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
Ord
, Num ThirtyTwoBitTimeStamp
Ord ThirtyTwoBitTimeStamp
(Num ThirtyTwoBitTimeStamp, Ord ThirtyTwoBitTimeStamp) =>
(ThirtyTwoBitTimeStamp -> Rational) -> Real ThirtyTwoBitTimeStamp
ThirtyTwoBitTimeStamp -> Rational
forall a. (Num a, Ord a) => (a -> Rational) -> Real a
$ctoRational :: ThirtyTwoBitTimeStamp -> Rational
toRational :: ThirtyTwoBitTimeStamp -> Rational
Real
, Int -> ThirtyTwoBitTimeStamp -> ShowS
[ThirtyTwoBitTimeStamp] -> ShowS
ThirtyTwoBitTimeStamp -> String
(Int -> ThirtyTwoBitTimeStamp -> ShowS)
-> (ThirtyTwoBitTimeStamp -> String)
-> ([ThirtyTwoBitTimeStamp] -> ShowS)
-> Show ThirtyTwoBitTimeStamp
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ThirtyTwoBitTimeStamp -> ShowS
showsPrec :: Int -> ThirtyTwoBitTimeStamp -> ShowS
$cshow :: ThirtyTwoBitTimeStamp -> String
show :: ThirtyTwoBitTimeStamp -> String
$cshowList :: [ThirtyTwoBitTimeStamp] -> ShowS
showList :: [ThirtyTwoBitTimeStamp] -> ShowS
Show
, Typeable
)
instance Wrapped ThirtyTwoBitTimeStamp
instance Pretty ThirtyTwoBitTimeStamp where
pretty :: forall ann. ThirtyTwoBitTimeStamp -> Doc ann
pretty =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty
(String -> Doc ann)
-> (ThirtyTwoBitTimeStamp -> String)
-> ThirtyTwoBitTimeStamp
-> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TimeLocale -> String -> UTCTime -> String
forall t. FormatTime t => TimeLocale -> String -> t -> String
formatTime TimeLocale
defaultTimeLocale String
"%Y%m%d-%H%M%S"
(UTCTime -> String)
-> (ThirtyTwoBitTimeStamp -> UTCTime)
-> ThirtyTwoBitTimeStamp
-> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. POSIXTime -> UTCTime
posixSecondsToUTCTime
(POSIXTime -> UTCTime)
-> (ThirtyTwoBitTimeStamp -> POSIXTime)
-> ThirtyTwoBitTimeStamp
-> UTCTime
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ThirtyTwoBitTimeStamp -> POSIXTime
forall a b. (Real a, Fractional b) => a -> b
realToFrac
$(ATH.deriveJSON ATH.defaultOptions ''ThirtyTwoBitTimeStamp)
durU :: (Integral a, Show a) => a -> Maybe (String, a)
durU :: forall a. (Integral a, Show a) => a -> Maybe (String, a)
durU a
x
| a
x a -> a -> Bool
forall a. Ord a => a -> a -> Bool
>= a
31557600 =
(String, a) -> Maybe (String, a)
forall a. a -> Maybe a
Just ((String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
"y") ShowS -> (a -> String) -> a -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> String
forall a. Show a => a -> String
show (a -> String) -> a -> String
forall a b. (a -> b) -> a -> b
$ a
x a -> a -> a
forall a. Integral a => a -> a -> a
`div` a
31557600, a
x a -> a -> a
forall a. Integral a => a -> a -> a
`mod` a
31557600)
| a
x a -> a -> Bool
forall a. Ord a => a -> a -> Bool
>= a
2629800 =
(String, a) -> Maybe (String, a)
forall a. a -> Maybe a
Just ((String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
"m") ShowS -> (a -> String) -> a -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> String
forall a. Show a => a -> String
show (a -> String) -> a -> String
forall a b. (a -> b) -> a -> b
$ a
x a -> a -> a
forall a. Integral a => a -> a -> a
`div` a
2629800, a
x a -> a -> a
forall a. Integral a => a -> a -> a
`mod` a
2629800)
| a
x a -> a -> Bool
forall a. Ord a => a -> a -> Bool
>= a
86400 =
(String, a) -> Maybe (String, a)
forall a. a -> Maybe a
Just ((String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
"d") ShowS -> (a -> String) -> a -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> String
forall a. Show a => a -> String
show (a -> String) -> a -> String
forall a b. (a -> b) -> a -> b
$ a
x a -> a -> a
forall a. Integral a => a -> a -> a
`div` a
86400, a
x a -> a -> a
forall a. Integral a => a -> a -> a
`mod` a
86400)
| a
x a -> a -> Bool
forall a. Ord a => a -> a -> Bool
> a
0 = (String, a) -> Maybe (String, a)
forall a. a -> Maybe a
Just ((String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
"s") ShowS -> (a -> String) -> a -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> String
forall a. Show a => a -> String
show (a -> String) -> a -> String
forall a b. (a -> b) -> a -> b
$ a
x, a
0)
| Bool
otherwise = Maybe (String, a)
forall a. Maybe a
Nothing
newtype ThirtyTwoBitDuration
= ThirtyTwoBitDuration
{ ThirtyTwoBitDuration -> Word32
unThirtyTwoBitDuration :: Word32
}
deriving
( ThirtyTwoBitDuration
ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> Bounded ThirtyTwoBitDuration
forall a. a -> a -> Bounded a
$cminBound :: ThirtyTwoBitDuration
minBound :: ThirtyTwoBitDuration
$cmaxBound :: ThirtyTwoBitDuration
maxBound :: ThirtyTwoBitDuration
Bounded
, Typeable ThirtyTwoBitDuration
Typeable ThirtyTwoBitDuration =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ThirtyTwoBitDuration
-> c ThirtyTwoBitDuration)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ThirtyTwoBitDuration)
-> (ThirtyTwoBitDuration -> Constr)
-> (ThirtyTwoBitDuration -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ThirtyTwoBitDuration))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ThirtyTwoBitDuration))
-> ((forall b. Data b => b -> b)
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ThirtyTwoBitDuration -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ThirtyTwoBitDuration -> r)
-> (forall u.
(forall d. Data d => d -> u) -> ThirtyTwoBitDuration -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> ThirtyTwoBitDuration -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitDuration -> m ThirtyTwoBitDuration)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitDuration -> m ThirtyTwoBitDuration)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitDuration -> m ThirtyTwoBitDuration)
-> Data ThirtyTwoBitDuration
ThirtyTwoBitDuration -> Constr
ThirtyTwoBitDuration -> DataType
(forall b. Data b => b -> b)
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> ThirtyTwoBitDuration -> u
forall u.
(forall d. Data d => d -> u) -> ThirtyTwoBitDuration -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ThirtyTwoBitDuration -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ThirtyTwoBitDuration -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitDuration -> m ThirtyTwoBitDuration
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitDuration -> m ThirtyTwoBitDuration
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ThirtyTwoBitDuration
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ThirtyTwoBitDuration
-> c ThirtyTwoBitDuration
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ThirtyTwoBitDuration)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ThirtyTwoBitDuration)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ThirtyTwoBitDuration
-> c ThirtyTwoBitDuration
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ThirtyTwoBitDuration
-> c ThirtyTwoBitDuration
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ThirtyTwoBitDuration
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ThirtyTwoBitDuration
$ctoConstr :: ThirtyTwoBitDuration -> Constr
toConstr :: ThirtyTwoBitDuration -> Constr
$cdataTypeOf :: ThirtyTwoBitDuration -> DataType
dataTypeOf :: ThirtyTwoBitDuration -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ThirtyTwoBitDuration)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ThirtyTwoBitDuration)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ThirtyTwoBitDuration)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ThirtyTwoBitDuration)
$cgmapT :: (forall b. Data b => b -> b)
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
gmapT :: (forall b. Data b => b -> b)
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ThirtyTwoBitDuration -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ThirtyTwoBitDuration -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ThirtyTwoBitDuration -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ThirtyTwoBitDuration -> r
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> ThirtyTwoBitDuration -> [u]
gmapQ :: forall u.
(forall d. Data d => d -> u) -> ThirtyTwoBitDuration -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ThirtyTwoBitDuration -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ThirtyTwoBitDuration -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitDuration -> m ThirtyTwoBitDuration
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitDuration -> m ThirtyTwoBitDuration
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitDuration -> m ThirtyTwoBitDuration
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitDuration -> m ThirtyTwoBitDuration
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitDuration -> m ThirtyTwoBitDuration
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitDuration -> m ThirtyTwoBitDuration
Data
, Int -> ThirtyTwoBitDuration
ThirtyTwoBitDuration -> Int
ThirtyTwoBitDuration -> [ThirtyTwoBitDuration]
ThirtyTwoBitDuration -> ThirtyTwoBitDuration
ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> [ThirtyTwoBitDuration]
ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> [ThirtyTwoBitDuration]
(ThirtyTwoBitDuration -> ThirtyTwoBitDuration)
-> (ThirtyTwoBitDuration -> ThirtyTwoBitDuration)
-> (Int -> ThirtyTwoBitDuration)
-> (ThirtyTwoBitDuration -> Int)
-> (ThirtyTwoBitDuration -> [ThirtyTwoBitDuration])
-> (ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> [ThirtyTwoBitDuration])
-> (ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> [ThirtyTwoBitDuration])
-> (ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> [ThirtyTwoBitDuration])
-> Enum ThirtyTwoBitDuration
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration
succ :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$cpred :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration
pred :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$ctoEnum :: Int -> ThirtyTwoBitDuration
toEnum :: Int -> ThirtyTwoBitDuration
$cfromEnum :: ThirtyTwoBitDuration -> Int
fromEnum :: ThirtyTwoBitDuration -> Int
$cenumFrom :: ThirtyTwoBitDuration -> [ThirtyTwoBitDuration]
enumFrom :: ThirtyTwoBitDuration -> [ThirtyTwoBitDuration]
$cenumFromThen :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> [ThirtyTwoBitDuration]
enumFromThen :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> [ThirtyTwoBitDuration]
$cenumFromTo :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> [ThirtyTwoBitDuration]
enumFromTo :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> [ThirtyTwoBitDuration]
$cenumFromThenTo :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> [ThirtyTwoBitDuration]
enumFromThenTo :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> [ThirtyTwoBitDuration]
Enum
, ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool
(ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool)
-> (ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool)
-> Eq ThirtyTwoBitDuration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool
== :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool
$c/= :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool
/= :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool
Eq
, (forall x. ThirtyTwoBitDuration -> Rep ThirtyTwoBitDuration x)
-> (forall x. Rep ThirtyTwoBitDuration x -> ThirtyTwoBitDuration)
-> Generic ThirtyTwoBitDuration
forall x. Rep ThirtyTwoBitDuration x -> ThirtyTwoBitDuration
forall x. ThirtyTwoBitDuration -> Rep ThirtyTwoBitDuration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. ThirtyTwoBitDuration -> Rep ThirtyTwoBitDuration x
from :: forall x. ThirtyTwoBitDuration -> Rep ThirtyTwoBitDuration x
$cto :: forall x. Rep ThirtyTwoBitDuration x -> ThirtyTwoBitDuration
to :: forall x. Rep ThirtyTwoBitDuration x -> ThirtyTwoBitDuration
Generic
, Eq ThirtyTwoBitDuration
Eq ThirtyTwoBitDuration =>
(Int -> ThirtyTwoBitDuration -> Int)
-> (ThirtyTwoBitDuration -> Int) -> Hashable ThirtyTwoBitDuration
Int -> ThirtyTwoBitDuration -> Int
ThirtyTwoBitDuration -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> ThirtyTwoBitDuration -> Int
hashWithSalt :: Int -> ThirtyTwoBitDuration -> Int
$chash :: ThirtyTwoBitDuration -> Int
hash :: ThirtyTwoBitDuration -> Int
Hashable
, Enum ThirtyTwoBitDuration
Real ThirtyTwoBitDuration
(Real ThirtyTwoBitDuration, Enum ThirtyTwoBitDuration) =>
(ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration)
-> (ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration)
-> (ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration)
-> (ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration)
-> (ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> (ThirtyTwoBitDuration, ThirtyTwoBitDuration))
-> (ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> (ThirtyTwoBitDuration, ThirtyTwoBitDuration))
-> (ThirtyTwoBitDuration -> Integer)
-> Integral ThirtyTwoBitDuration
ThirtyTwoBitDuration -> Integer
ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> (ThirtyTwoBitDuration, ThirtyTwoBitDuration)
ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
forall a.
(Real a, Enum a) =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
$cquot :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
quot :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$crem :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
rem :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$cdiv :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
div :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$cmod :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
mod :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$cquotRem :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> (ThirtyTwoBitDuration, ThirtyTwoBitDuration)
quotRem :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> (ThirtyTwoBitDuration, ThirtyTwoBitDuration)
$cdivMod :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> (ThirtyTwoBitDuration, ThirtyTwoBitDuration)
divMod :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> (ThirtyTwoBitDuration, ThirtyTwoBitDuration)
$ctoInteger :: ThirtyTwoBitDuration -> Integer
toInteger :: ThirtyTwoBitDuration -> Integer
Integral
, Integer -> ThirtyTwoBitDuration
ThirtyTwoBitDuration -> ThirtyTwoBitDuration
ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
(ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration)
-> (ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration)
-> (ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration)
-> (ThirtyTwoBitDuration -> ThirtyTwoBitDuration)
-> (ThirtyTwoBitDuration -> ThirtyTwoBitDuration)
-> (ThirtyTwoBitDuration -> ThirtyTwoBitDuration)
-> (Integer -> ThirtyTwoBitDuration)
-> Num ThirtyTwoBitDuration
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
+ :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$c- :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
- :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$c* :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
* :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$cnegate :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration
negate :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$cabs :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration
abs :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$csignum :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration
signum :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$cfromInteger :: Integer -> ThirtyTwoBitDuration
fromInteger :: Integer -> ThirtyTwoBitDuration
Num
, Eq ThirtyTwoBitDuration
Eq ThirtyTwoBitDuration =>
(ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Ordering)
-> (ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool)
-> (ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool)
-> (ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool)
-> (ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool)
-> (ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration)
-> (ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration)
-> Ord ThirtyTwoBitDuration
ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool
ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Ordering
ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Ordering
compare :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Ordering
$c< :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool
< :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool
$c<= :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool
<= :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool
$c> :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool
> :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool
$c>= :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool
>= :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool
$cmax :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
max :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$cmin :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
min :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
Ord
, Num ThirtyTwoBitDuration
Ord ThirtyTwoBitDuration
(Num ThirtyTwoBitDuration, Ord ThirtyTwoBitDuration) =>
(ThirtyTwoBitDuration -> Rational) -> Real ThirtyTwoBitDuration
ThirtyTwoBitDuration -> Rational
forall a. (Num a, Ord a) => (a -> Rational) -> Real a
$ctoRational :: ThirtyTwoBitDuration -> Rational
toRational :: ThirtyTwoBitDuration -> Rational
Real
, Int -> ThirtyTwoBitDuration -> ShowS
[ThirtyTwoBitDuration] -> ShowS
ThirtyTwoBitDuration -> String
(Int -> ThirtyTwoBitDuration -> ShowS)
-> (ThirtyTwoBitDuration -> String)
-> ([ThirtyTwoBitDuration] -> ShowS)
-> Show ThirtyTwoBitDuration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ThirtyTwoBitDuration -> ShowS
showsPrec :: Int -> ThirtyTwoBitDuration -> ShowS
$cshow :: ThirtyTwoBitDuration -> String
show :: ThirtyTwoBitDuration -> String
$cshowList :: [ThirtyTwoBitDuration] -> ShowS
showList :: [ThirtyTwoBitDuration] -> ShowS
Show
, Typeable
)
instance Wrapped ThirtyTwoBitDuration
instance Pretty ThirtyTwoBitDuration where
pretty :: forall ann. ThirtyTwoBitDuration -> Doc ann
pretty = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (String -> Doc ann)
-> (ThirtyTwoBitDuration -> String)
-> ThirtyTwoBitDuration
-> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [String] -> String
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat ([String] -> String)
-> (ThirtyTwoBitDuration -> [String])
-> ThirtyTwoBitDuration
-> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Word32 -> Maybe (String, Word32)) -> Word32 -> [String]
forall b a. (b -> Maybe (a, b)) -> b -> [a]
unfoldr Word32 -> Maybe (String, Word32)
forall a. (Integral a, Show a) => a -> Maybe (String, a)
durU (Word32 -> [String])
-> (ThirtyTwoBitDuration -> Word32)
-> ThirtyTwoBitDuration
-> [String]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped ThirtyTwoBitDuration -> ThirtyTwoBitDuration)
-> ThirtyTwoBitDuration -> Unwrapped ThirtyTwoBitDuration
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op Word32 -> ThirtyTwoBitDuration
Unwrapped ThirtyTwoBitDuration -> ThirtyTwoBitDuration
ThirtyTwoBitDuration
$(ATH.deriveJSON ATH.defaultOptions ''ThirtyTwoBitDuration)
data RevocationClass
= SensitiveRK
| RClOther Word8
deriving (Typeable RevocationClass
Typeable RevocationClass =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RevocationClass -> c RevocationClass)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RevocationClass)
-> (RevocationClass -> Constr)
-> (RevocationClass -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RevocationClass))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RevocationClass))
-> ((forall b. Data b => b -> b)
-> RevocationClass -> RevocationClass)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationClass -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationClass -> r)
-> (forall u.
(forall d. Data d => d -> u) -> RevocationClass -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> RevocationClass -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RevocationClass -> m RevocationClass)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationClass -> m RevocationClass)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationClass -> m RevocationClass)
-> Data RevocationClass
RevocationClass -> Constr
RevocationClass -> DataType
(forall b. Data b => b -> b) -> RevocationClass -> RevocationClass
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> RevocationClass -> u
forall u. (forall d. Data d => d -> u) -> RevocationClass -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationClass -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationClass -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RevocationClass -> m RevocationClass
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationClass -> m RevocationClass
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RevocationClass
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RevocationClass -> c RevocationClass
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RevocationClass)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RevocationClass)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RevocationClass -> c RevocationClass
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RevocationClass -> c RevocationClass
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RevocationClass
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RevocationClass
$ctoConstr :: RevocationClass -> Constr
toConstr :: RevocationClass -> Constr
$cdataTypeOf :: RevocationClass -> DataType
dataTypeOf :: RevocationClass -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RevocationClass)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RevocationClass)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RevocationClass)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RevocationClass)
$cgmapT :: (forall b. Data b => b -> b) -> RevocationClass -> RevocationClass
gmapT :: (forall b. Data b => b -> b) -> RevocationClass -> RevocationClass
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationClass -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationClass -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationClass -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationClass -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> RevocationClass -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> RevocationClass -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> RevocationClass -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> RevocationClass -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RevocationClass -> m RevocationClass
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RevocationClass -> m RevocationClass
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationClass -> m RevocationClass
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationClass -> m RevocationClass
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationClass -> m RevocationClass
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationClass -> m RevocationClass
Data, (forall x. RevocationClass -> Rep RevocationClass x)
-> (forall x. Rep RevocationClass x -> RevocationClass)
-> Generic RevocationClass
forall x. Rep RevocationClass x -> RevocationClass
forall x. RevocationClass -> Rep RevocationClass x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. RevocationClass -> Rep RevocationClass x
from :: forall x. RevocationClass -> Rep RevocationClass x
$cto :: forall x. Rep RevocationClass x -> RevocationClass
to :: forall x. Rep RevocationClass x -> RevocationClass
Generic, Int -> RevocationClass -> ShowS
[RevocationClass] -> ShowS
RevocationClass -> String
(Int -> RevocationClass -> ShowS)
-> (RevocationClass -> String)
-> ([RevocationClass] -> ShowS)
-> Show RevocationClass
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RevocationClass -> ShowS
showsPrec :: Int -> RevocationClass -> ShowS
$cshow :: RevocationClass -> String
show :: RevocationClass -> String
$cshowList :: [RevocationClass] -> ShowS
showList :: [RevocationClass] -> ShowS
Show, Typeable)
mkRevocationClass :: Word8 -> RevocationClass
mkRevocationClass :: Word8 -> RevocationClass
mkRevocationClass Word8
i
| Word8
i' Word8 -> Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== Word8
1 = RevocationClass
SensitiveRK
| Bool
otherwise = Word8 -> RevocationClass
RClOther Word8
i'
where
i' :: Word8
i' = Word8
i Word8 -> Word8 -> Word8
forall a. Bits a => a -> a -> a
.&. Word8
0x07
instance Eq RevocationClass where
== :: RevocationClass -> RevocationClass -> Bool
(==) RevocationClass
a RevocationClass
b = RevocationClass -> Int
forall a. FutureFlag a => a -> Int
fromFFlag RevocationClass
a Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== RevocationClass -> Int
forall a. FutureFlag a => a -> Int
fromFFlag RevocationClass
b
instance Ord RevocationClass where
compare :: RevocationClass -> RevocationClass -> Ordering
compare = (RevocationClass -> Int)
-> RevocationClass -> RevocationClass -> Ordering
forall a b. Ord a => (b -> a) -> b -> b -> Ordering
comparing RevocationClass -> Int
forall a. FutureFlag a => a -> Int
fromFFlag
instance FutureFlag RevocationClass where
fromFFlag :: RevocationClass -> Int
fromFFlag RevocationClass
SensitiveRK = Int
1
fromFFlag (RClOther Word8
i) = Word8 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word8
i Word8 -> Word8 -> Word8
forall a. Bits a => a -> a -> a
.&. Word8
0x07)
toFFlag :: Int -> RevocationClass
toFFlag Int
1 = RevocationClass
SensitiveRK
toFFlag Int
i = Word8 -> RevocationClass
mkRevocationClass (Int -> Word8
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
i)
instance Hashable RevocationClass
instance Pretty RevocationClass where
pretty :: forall ann. RevocationClass -> Doc ann
pretty RevocationClass
SensitiveRK = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"sensitive"
pretty (RClOther Word8
o) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"unknown revocation class" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
o
$(ATH.deriveJSON ATH.defaultOptions ''RevocationClass)
data PubKeyAlgorithm
= RSA
| DeprecatedRSAEncryptOnly
| DeprecatedRSASignOnly
| ElgamalEncryptOnly
| DSA
| ECDH
| ECDSA
| ForbiddenElgamal
| DH
| EdDSALegacy
| X25519
| X448
| Ed25519
| Ed448
| MLDSA65Ed25519
| MLDSA87Ed448
| SLHDSASHAKE128s
| SLHDSASHAKE128f
| SLHDSASHAKE256s
| MLKEM768X25519
| MLKEM1024X448
| OtherPKA Word8
deriving (Typeable PubKeyAlgorithm
Typeable PubKeyAlgorithm =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PubKeyAlgorithm -> c PubKeyAlgorithm)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PubKeyAlgorithm)
-> (PubKeyAlgorithm -> Constr)
-> (PubKeyAlgorithm -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PubKeyAlgorithm))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PubKeyAlgorithm))
-> ((forall b. Data b => b -> b)
-> PubKeyAlgorithm -> PubKeyAlgorithm)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PubKeyAlgorithm -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PubKeyAlgorithm -> r)
-> (forall u.
(forall d. Data d => d -> u) -> PubKeyAlgorithm -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> PubKeyAlgorithm -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PubKeyAlgorithm -> m PubKeyAlgorithm)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PubKeyAlgorithm -> m PubKeyAlgorithm)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PubKeyAlgorithm -> m PubKeyAlgorithm)
-> Data PubKeyAlgorithm
PubKeyAlgorithm -> Constr
PubKeyAlgorithm -> DataType
(forall b. Data b => b -> b) -> PubKeyAlgorithm -> PubKeyAlgorithm
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> PubKeyAlgorithm -> u
forall u. (forall d. Data d => d -> u) -> PubKeyAlgorithm -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PubKeyAlgorithm -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PubKeyAlgorithm -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PubKeyAlgorithm -> m PubKeyAlgorithm
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PubKeyAlgorithm -> m PubKeyAlgorithm
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PubKeyAlgorithm
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PubKeyAlgorithm -> c PubKeyAlgorithm
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PubKeyAlgorithm)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PubKeyAlgorithm)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PubKeyAlgorithm -> c PubKeyAlgorithm
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PubKeyAlgorithm -> c PubKeyAlgorithm
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PubKeyAlgorithm
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PubKeyAlgorithm
$ctoConstr :: PubKeyAlgorithm -> Constr
toConstr :: PubKeyAlgorithm -> Constr
$cdataTypeOf :: PubKeyAlgorithm -> DataType
dataTypeOf :: PubKeyAlgorithm -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PubKeyAlgorithm)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PubKeyAlgorithm)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PubKeyAlgorithm)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PubKeyAlgorithm)
$cgmapT :: (forall b. Data b => b -> b) -> PubKeyAlgorithm -> PubKeyAlgorithm
gmapT :: (forall b. Data b => b -> b) -> PubKeyAlgorithm -> PubKeyAlgorithm
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PubKeyAlgorithm -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PubKeyAlgorithm -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PubKeyAlgorithm -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PubKeyAlgorithm -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> PubKeyAlgorithm -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> PubKeyAlgorithm -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> PubKeyAlgorithm -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> PubKeyAlgorithm -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PubKeyAlgorithm -> m PubKeyAlgorithm
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PubKeyAlgorithm -> m PubKeyAlgorithm
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PubKeyAlgorithm -> m PubKeyAlgorithm
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PubKeyAlgorithm -> m PubKeyAlgorithm
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PubKeyAlgorithm -> m PubKeyAlgorithm
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PubKeyAlgorithm -> m PubKeyAlgorithm
Data, (forall x. PubKeyAlgorithm -> Rep PubKeyAlgorithm x)
-> (forall x. Rep PubKeyAlgorithm x -> PubKeyAlgorithm)
-> Generic PubKeyAlgorithm
forall x. Rep PubKeyAlgorithm x -> PubKeyAlgorithm
forall x. PubKeyAlgorithm -> Rep PubKeyAlgorithm x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. PubKeyAlgorithm -> Rep PubKeyAlgorithm x
from :: forall x. PubKeyAlgorithm -> Rep PubKeyAlgorithm x
$cto :: forall x. Rep PubKeyAlgorithm x -> PubKeyAlgorithm
to :: forall x. Rep PubKeyAlgorithm x -> PubKeyAlgorithm
Generic, Int -> PubKeyAlgorithm -> ShowS
[PubKeyAlgorithm] -> ShowS
PubKeyAlgorithm -> String
(Int -> PubKeyAlgorithm -> ShowS)
-> (PubKeyAlgorithm -> String)
-> ([PubKeyAlgorithm] -> ShowS)
-> Show PubKeyAlgorithm
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PubKeyAlgorithm -> ShowS
showsPrec :: Int -> PubKeyAlgorithm -> ShowS
$cshow :: PubKeyAlgorithm -> String
show :: PubKeyAlgorithm -> String
$cshowList :: [PubKeyAlgorithm] -> ShowS
showList :: [PubKeyAlgorithm] -> ShowS
Show, Typeable)
instance Eq PubKeyAlgorithm where
== :: PubKeyAlgorithm -> PubKeyAlgorithm -> Bool
(==) PubKeyAlgorithm
a PubKeyAlgorithm
b = PubKeyAlgorithm -> Word8
forall a. FutureVal a => a -> Word8
fromFVal PubKeyAlgorithm
a Word8 -> Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== PubKeyAlgorithm -> Word8
forall a. FutureVal a => a -> Word8
fromFVal PubKeyAlgorithm
b
instance Ord PubKeyAlgorithm where
compare :: PubKeyAlgorithm -> PubKeyAlgorithm -> Ordering
compare = (PubKeyAlgorithm -> Word8)
-> PubKeyAlgorithm -> PubKeyAlgorithm -> Ordering
forall a b. Ord a => (b -> a) -> b -> b -> Ordering
comparing PubKeyAlgorithm -> Word8
forall a. FutureVal a => a -> Word8
fromFVal
instance FutureVal PubKeyAlgorithm where
fromFVal :: PubKeyAlgorithm -> Word8
fromFVal PubKeyAlgorithm
RSA = Word8
1
fromFVal PubKeyAlgorithm
DeprecatedRSAEncryptOnly = Word8
2
fromFVal PubKeyAlgorithm
DeprecatedRSASignOnly = Word8
3
fromFVal PubKeyAlgorithm
ElgamalEncryptOnly = Word8
16
fromFVal PubKeyAlgorithm
DSA = Word8
17
fromFVal PubKeyAlgorithm
ECDH = Word8
18
fromFVal PubKeyAlgorithm
ECDSA = Word8
19
fromFVal PubKeyAlgorithm
ForbiddenElgamal = Word8
20
fromFVal PubKeyAlgorithm
DH = Word8
21
fromFVal PubKeyAlgorithm
EdDSALegacy = Word8
22
fromFVal PubKeyAlgorithm
X25519 = Word8
25
fromFVal PubKeyAlgorithm
X448 = Word8
26
fromFVal PubKeyAlgorithm
Ed25519 = Word8
27
fromFVal PubKeyAlgorithm
Ed448 = Word8
28
fromFVal PubKeyAlgorithm
MLDSA65Ed25519 = Word8
30
fromFVal PubKeyAlgorithm
MLDSA87Ed448 = Word8
31
fromFVal PubKeyAlgorithm
SLHDSASHAKE128s = Word8
32
fromFVal PubKeyAlgorithm
SLHDSASHAKE128f = Word8
33
fromFVal PubKeyAlgorithm
SLHDSASHAKE256s = Word8
34
fromFVal PubKeyAlgorithm
MLKEM768X25519 = Word8
35
fromFVal PubKeyAlgorithm
MLKEM1024X448 = Word8
36
fromFVal (OtherPKA Word8
o) = Word8
o
toFVal :: Word8 -> PubKeyAlgorithm
toFVal Word8
1 = PubKeyAlgorithm
RSA
toFVal Word8
2 = PubKeyAlgorithm
DeprecatedRSAEncryptOnly
toFVal Word8
3 = PubKeyAlgorithm
DeprecatedRSASignOnly
toFVal Word8
16 = PubKeyAlgorithm
ElgamalEncryptOnly
toFVal Word8
17 = PubKeyAlgorithm
DSA
toFVal Word8
18 = PubKeyAlgorithm
ECDH
toFVal Word8
19 = PubKeyAlgorithm
ECDSA
toFVal Word8
20 = PubKeyAlgorithm
ForbiddenElgamal
toFVal Word8
21 = PubKeyAlgorithm
DH
toFVal Word8
22 = PubKeyAlgorithm
EdDSALegacy
toFVal Word8
25 = PubKeyAlgorithm
X25519
toFVal Word8
26 = PubKeyAlgorithm
X448
toFVal Word8
27 = PubKeyAlgorithm
Ed25519
toFVal Word8
28 = PubKeyAlgorithm
Ed448
toFVal Word8
30 = PubKeyAlgorithm
MLDSA65Ed25519
toFVal Word8
31 = PubKeyAlgorithm
MLDSA87Ed448
toFVal Word8
32 = PubKeyAlgorithm
SLHDSASHAKE128s
toFVal Word8
33 = PubKeyAlgorithm
SLHDSASHAKE128f
toFVal Word8
34 = PubKeyAlgorithm
SLHDSASHAKE256s
toFVal Word8
35 = PubKeyAlgorithm
MLKEM768X25519
toFVal Word8
36 = PubKeyAlgorithm
MLKEM1024X448
toFVal Word8
o = Word8 -> PubKeyAlgorithm
OtherPKA Word8
o
instance Hashable PubKeyAlgorithm
instance Pretty PubKeyAlgorithm where
pretty :: forall ann. PubKeyAlgorithm -> Doc ann
pretty PubKeyAlgorithm
RSA = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"RSA"
pretty PubKeyAlgorithm
DeprecatedRSAEncryptOnly = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"(deprecated) RSA encrypt-only"
pretty PubKeyAlgorithm
DeprecatedRSASignOnly = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"(deprecated) RSA sign-only"
pretty PubKeyAlgorithm
ElgamalEncryptOnly = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"Elgamal encrypt-only"
pretty PubKeyAlgorithm
DSA = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"DSA"
pretty PubKeyAlgorithm
ECDH = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"ECDH"
pretty PubKeyAlgorithm
ECDSA = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"ECDSA"
pretty PubKeyAlgorithm
ForbiddenElgamal = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"(forbidden) Elgamal"
pretty PubKeyAlgorithm
DH = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"DH"
pretty PubKeyAlgorithm
EdDSALegacy = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"EdDSA (legacy)"
pretty PubKeyAlgorithm
X25519 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"X25519"
pretty PubKeyAlgorithm
X448 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"X448"
pretty PubKeyAlgorithm
Ed25519 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"Ed25519"
pretty PubKeyAlgorithm
Ed448 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"Ed448"
pretty PubKeyAlgorithm
MLDSA65Ed25519 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"ML-DSA-65+Ed25519"
pretty PubKeyAlgorithm
MLDSA87Ed448 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"ML-DSA-87+Ed448"
pretty PubKeyAlgorithm
SLHDSASHAKE128s = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"SLH-DSA-SHAKE-128s"
pretty PubKeyAlgorithm
SLHDSASHAKE128f = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"SLH-DSA-SHAKE-128f"
pretty PubKeyAlgorithm
SLHDSASHAKE256s = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"SLH-DSA-SHAKE-256s"
pretty PubKeyAlgorithm
MLKEM768X25519 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"ML-KEM-768+X25519"
pretty PubKeyAlgorithm
MLKEM1024X448 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"ML-KEM-1024+X448"
pretty (OtherPKA Word8
pka) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"unknown pubkey algorithm type" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
pka
$(ATH.deriveJSON ATH.defaultOptions ''PubKeyAlgorithm)
newtype Fingerprint
= Fingerprint
{ Fingerprint -> ByteString
unFingerprint :: B.ByteString
}
deriving (Typeable Fingerprint
Typeable Fingerprint =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Fingerprint -> c Fingerprint)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Fingerprint)
-> (Fingerprint -> Constr)
-> (Fingerprint -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Fingerprint))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Fingerprint))
-> ((forall b. Data b => b -> b) -> Fingerprint -> Fingerprint)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Fingerprint -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Fingerprint -> r)
-> (forall u. (forall d. Data d => d -> u) -> Fingerprint -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> Fingerprint -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Fingerprint -> m Fingerprint)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Fingerprint -> m Fingerprint)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Fingerprint -> m Fingerprint)
-> Data Fingerprint
Fingerprint -> Constr
Fingerprint -> DataType
(forall b. Data b => b -> b) -> Fingerprint -> Fingerprint
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Fingerprint -> u
forall u. (forall d. Data d => d -> u) -> Fingerprint -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Fingerprint -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Fingerprint -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Fingerprint -> m Fingerprint
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Fingerprint -> m Fingerprint
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Fingerprint
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Fingerprint -> c Fingerprint
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Fingerprint)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Fingerprint)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Fingerprint -> c Fingerprint
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Fingerprint -> c Fingerprint
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Fingerprint
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Fingerprint
$ctoConstr :: Fingerprint -> Constr
toConstr :: Fingerprint -> Constr
$cdataTypeOf :: Fingerprint -> DataType
dataTypeOf :: Fingerprint -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Fingerprint)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Fingerprint)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Fingerprint)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Fingerprint)
$cgmapT :: (forall b. Data b => b -> b) -> Fingerprint -> Fingerprint
gmapT :: (forall b. Data b => b -> b) -> Fingerprint -> Fingerprint
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Fingerprint -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Fingerprint -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Fingerprint -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Fingerprint -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Fingerprint -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Fingerprint -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Fingerprint -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Fingerprint -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Fingerprint -> m Fingerprint
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Fingerprint -> m Fingerprint
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Fingerprint -> m Fingerprint
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Fingerprint -> m Fingerprint
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Fingerprint -> m Fingerprint
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Fingerprint -> m Fingerprint
Data, Fingerprint -> Fingerprint -> Bool
(Fingerprint -> Fingerprint -> Bool)
-> (Fingerprint -> Fingerprint -> Bool) -> Eq Fingerprint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Fingerprint -> Fingerprint -> Bool
== :: Fingerprint -> Fingerprint -> Bool
$c/= :: Fingerprint -> Fingerprint -> Bool
/= :: Fingerprint -> Fingerprint -> Bool
Eq, (forall x. Fingerprint -> Rep Fingerprint x)
-> (forall x. Rep Fingerprint x -> Fingerprint)
-> Generic Fingerprint
forall x. Rep Fingerprint x -> Fingerprint
forall x. Fingerprint -> Rep Fingerprint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. Fingerprint -> Rep Fingerprint x
from :: forall x. Fingerprint -> Rep Fingerprint x
$cto :: forall x. Rep Fingerprint x -> Fingerprint
to :: forall x. Rep Fingerprint x -> Fingerprint
Generic, Eq Fingerprint
Eq Fingerprint =>
(Fingerprint -> Fingerprint -> Ordering)
-> (Fingerprint -> Fingerprint -> Bool)
-> (Fingerprint -> Fingerprint -> Bool)
-> (Fingerprint -> Fingerprint -> Bool)
-> (Fingerprint -> Fingerprint -> Bool)
-> (Fingerprint -> Fingerprint -> Fingerprint)
-> (Fingerprint -> Fingerprint -> Fingerprint)
-> Ord Fingerprint
Fingerprint -> Fingerprint -> Bool
Fingerprint -> Fingerprint -> Ordering
Fingerprint -> Fingerprint -> Fingerprint
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Fingerprint -> Fingerprint -> Ordering
compare :: Fingerprint -> Fingerprint -> Ordering
$c< :: Fingerprint -> Fingerprint -> Bool
< :: Fingerprint -> Fingerprint -> Bool
$c<= :: Fingerprint -> Fingerprint -> Bool
<= :: Fingerprint -> Fingerprint -> Bool
$c> :: Fingerprint -> Fingerprint -> Bool
> :: Fingerprint -> Fingerprint -> Bool
$c>= :: Fingerprint -> Fingerprint -> Bool
>= :: Fingerprint -> Fingerprint -> Bool
$cmax :: Fingerprint -> Fingerprint -> Fingerprint
max :: Fingerprint -> Fingerprint -> Fingerprint
$cmin :: Fingerprint -> Fingerprint -> Fingerprint
min :: Fingerprint -> Fingerprint -> Fingerprint
Ord, Int -> Fingerprint -> ShowS
[Fingerprint] -> ShowS
Fingerprint -> String
(Int -> Fingerprint -> ShowS)
-> (Fingerprint -> String)
-> ([Fingerprint] -> ShowS)
-> Show Fingerprint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Fingerprint -> ShowS
showsPrec :: Int -> Fingerprint -> ShowS
$cshow :: Fingerprint -> String
show :: Fingerprint -> String
$cshowList :: [Fingerprint] -> ShowS
showList :: [Fingerprint] -> ShowS
Show, Typeable)
instance Wrapped Fingerprint
instance Read Fingerprint where
readsPrec :: Int -> ReadS Fingerprint
readsPrec Int
_ String
s =
let ws :: [(Word8, String)]
ws = ReadS Word8
hexToW8s ((Char -> Bool) -> ShowS
forall a. (a -> Bool) -> [a] -> [a]
filter (Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
/= Char
' ') String
s)
in if [(Word8, String)] -> Bool
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null [(Word8, String)]
ws
then []
else [(ByteString -> Fingerprint
Fingerprint ([Word8] -> ByteString
B.pack (((Word8, String) -> Word8) -> [(Word8, String)] -> [Word8]
forall a b. (a -> b) -> [a] -> [b]
map (Word8, String) -> Word8
forall a b. (a, b) -> a
fst [(Word8, String)]
ws)), (Word8, String) -> String
forall a b. (a, b) -> b
snd ([(Word8, String)] -> (Word8, String)
forall a. HasCallStack => [a] -> a
last [(Word8, String)]
ws))]
instance Hashable Fingerprint
instance Pretty Fingerprint where
pretty :: forall ann. Fingerprint -> Doc ann
pretty = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (String -> Doc ann)
-> (Fingerprint -> String) -> Fingerprint -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> String
bsToHexUpper (ByteString -> String)
-> (Fingerprint -> ByteString) -> Fingerprint -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Fingerprint -> ByteString
unFingerprint
instance A.ToJSON Fingerprint where
toJSON :: Fingerprint -> Value
toJSON Fingerprint
e = [Pair] -> Value
object [String -> Key
AK.fromString String
"fpr" Key -> Value -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= (String -> Value
forall a. ToJSON a => a -> Value
A.toJSON (String -> Value)
-> (Fingerprint -> String) -> Fingerprint -> Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Doc (ZonkAny 0) -> String
forall a. Show a => a -> String
show (Doc (ZonkAny 0) -> String)
-> (Fingerprint -> Doc (ZonkAny 0)) -> Fingerprint -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Fingerprint -> Doc (ZonkAny 0)
forall a ann. Pretty a => a -> Doc ann
forall ann. Fingerprint -> Doc ann
pretty) Fingerprint
e]
instance A.FromJSON Fingerprint where
parseJSON :: Value -> Parser Fingerprint
parseJSON (A.Object Object
v) = ByteString -> Fingerprint
Fingerprint (ByteString -> Fingerprint)
-> (String -> ByteString) -> String -> Fingerprint
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> ByteString
forall a. Read a => String -> a
read (String -> Fingerprint) -> Parser String -> Parser Fingerprint
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser String
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"fpr"
parseJSON Value
_ = Parser Fingerprint
forall a. Parser a
forall (m :: * -> *) a. MonadPlus m => m a
mzero
newtype SpacedFingerprint
= SpacedFingerprint
{ SpacedFingerprint -> Fingerprint
unSpacedFingerprint :: Fingerprint
}
deriving (Typeable SpacedFingerprint
Typeable SpacedFingerprint =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SpacedFingerprint
-> c SpacedFingerprint)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SpacedFingerprint)
-> (SpacedFingerprint -> Constr)
-> (SpacedFingerprint -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SpacedFingerprint))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SpacedFingerprint))
-> ((forall b. Data b => b -> b)
-> SpacedFingerprint -> SpacedFingerprint)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SpacedFingerprint -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SpacedFingerprint -> r)
-> (forall u.
(forall d. Data d => d -> u) -> SpacedFingerprint -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> SpacedFingerprint -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SpacedFingerprint -> m SpacedFingerprint)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SpacedFingerprint -> m SpacedFingerprint)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SpacedFingerprint -> m SpacedFingerprint)
-> Data SpacedFingerprint
SpacedFingerprint -> Constr
SpacedFingerprint -> DataType
(forall b. Data b => b -> b)
-> SpacedFingerprint -> SpacedFingerprint
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> SpacedFingerprint -> u
forall u. (forall d. Data d => d -> u) -> SpacedFingerprint -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SpacedFingerprint -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SpacedFingerprint -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SpacedFingerprint -> m SpacedFingerprint
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SpacedFingerprint -> m SpacedFingerprint
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SpacedFingerprint
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SpacedFingerprint -> c SpacedFingerprint
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SpacedFingerprint)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SpacedFingerprint)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SpacedFingerprint -> c SpacedFingerprint
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SpacedFingerprint -> c SpacedFingerprint
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SpacedFingerprint
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SpacedFingerprint
$ctoConstr :: SpacedFingerprint -> Constr
toConstr :: SpacedFingerprint -> Constr
$cdataTypeOf :: SpacedFingerprint -> DataType
dataTypeOf :: SpacedFingerprint -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SpacedFingerprint)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SpacedFingerprint)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SpacedFingerprint)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SpacedFingerprint)
$cgmapT :: (forall b. Data b => b -> b)
-> SpacedFingerprint -> SpacedFingerprint
gmapT :: (forall b. Data b => b -> b)
-> SpacedFingerprint -> SpacedFingerprint
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SpacedFingerprint -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SpacedFingerprint -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SpacedFingerprint -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SpacedFingerprint -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SpacedFingerprint -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> SpacedFingerprint -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SpacedFingerprint -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SpacedFingerprint -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SpacedFingerprint -> m SpacedFingerprint
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SpacedFingerprint -> m SpacedFingerprint
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SpacedFingerprint -> m SpacedFingerprint
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SpacedFingerprint -> m SpacedFingerprint
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SpacedFingerprint -> m SpacedFingerprint
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SpacedFingerprint -> m SpacedFingerprint
Data, SpacedFingerprint -> SpacedFingerprint -> Bool
(SpacedFingerprint -> SpacedFingerprint -> Bool)
-> (SpacedFingerprint -> SpacedFingerprint -> Bool)
-> Eq SpacedFingerprint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SpacedFingerprint -> SpacedFingerprint -> Bool
== :: SpacedFingerprint -> SpacedFingerprint -> Bool
$c/= :: SpacedFingerprint -> SpacedFingerprint -> Bool
/= :: SpacedFingerprint -> SpacedFingerprint -> Bool
Eq, (forall x. SpacedFingerprint -> Rep SpacedFingerprint x)
-> (forall x. Rep SpacedFingerprint x -> SpacedFingerprint)
-> Generic SpacedFingerprint
forall x. Rep SpacedFingerprint x -> SpacedFingerprint
forall x. SpacedFingerprint -> Rep SpacedFingerprint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SpacedFingerprint -> Rep SpacedFingerprint x
from :: forall x. SpacedFingerprint -> Rep SpacedFingerprint x
$cto :: forall x. Rep SpacedFingerprint x -> SpacedFingerprint
to :: forall x. Rep SpacedFingerprint x -> SpacedFingerprint
Generic, Eq SpacedFingerprint
Eq SpacedFingerprint =>
(SpacedFingerprint -> SpacedFingerprint -> Ordering)
-> (SpacedFingerprint -> SpacedFingerprint -> Bool)
-> (SpacedFingerprint -> SpacedFingerprint -> Bool)
-> (SpacedFingerprint -> SpacedFingerprint -> Bool)
-> (SpacedFingerprint -> SpacedFingerprint -> Bool)
-> (SpacedFingerprint -> SpacedFingerprint -> SpacedFingerprint)
-> (SpacedFingerprint -> SpacedFingerprint -> SpacedFingerprint)
-> Ord SpacedFingerprint
SpacedFingerprint -> SpacedFingerprint -> Bool
SpacedFingerprint -> SpacedFingerprint -> Ordering
SpacedFingerprint -> SpacedFingerprint -> SpacedFingerprint
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: SpacedFingerprint -> SpacedFingerprint -> Ordering
compare :: SpacedFingerprint -> SpacedFingerprint -> Ordering
$c< :: SpacedFingerprint -> SpacedFingerprint -> Bool
< :: SpacedFingerprint -> SpacedFingerprint -> Bool
$c<= :: SpacedFingerprint -> SpacedFingerprint -> Bool
<= :: SpacedFingerprint -> SpacedFingerprint -> Bool
$c> :: SpacedFingerprint -> SpacedFingerprint -> Bool
> :: SpacedFingerprint -> SpacedFingerprint -> Bool
$c>= :: SpacedFingerprint -> SpacedFingerprint -> Bool
>= :: SpacedFingerprint -> SpacedFingerprint -> Bool
$cmax :: SpacedFingerprint -> SpacedFingerprint -> SpacedFingerprint
max :: SpacedFingerprint -> SpacedFingerprint -> SpacedFingerprint
$cmin :: SpacedFingerprint -> SpacedFingerprint -> SpacedFingerprint
min :: SpacedFingerprint -> SpacedFingerprint -> SpacedFingerprint
Ord, Int -> SpacedFingerprint -> ShowS
[SpacedFingerprint] -> ShowS
SpacedFingerprint -> String
(Int -> SpacedFingerprint -> ShowS)
-> (SpacedFingerprint -> String)
-> ([SpacedFingerprint] -> ShowS)
-> Show SpacedFingerprint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SpacedFingerprint -> ShowS
showsPrec :: Int -> SpacedFingerprint -> ShowS
$cshow :: SpacedFingerprint -> String
show :: SpacedFingerprint -> String
$cshowList :: [SpacedFingerprint] -> ShowS
showList :: [SpacedFingerprint] -> ShowS
Show, Typeable)
instance Wrapped SpacedFingerprint
instance Pretty SpacedFingerprint where
pretty :: forall ann. SpacedFingerprint -> Doc ann
pretty =
[Doc ann] -> Doc ann
forall ann. [Doc ann] -> Doc ann
hsep
([Doc ann] -> Doc ann)
-> (SpacedFingerprint -> [Doc ann]) -> SpacedFingerprint -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Doc ann -> [Doc ann] -> [Doc ann]
forall ann. Doc ann -> [Doc ann] -> [Doc ann]
punctuate Doc ann
forall ann. Doc ann
space
([Doc ann] -> [Doc ann])
-> (SpacedFingerprint -> [Doc ann])
-> SpacedFingerprint
-> [Doc ann]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ([Doc ann] -> Doc ann) -> [[Doc ann]] -> [Doc ann]
forall a b. (a -> b) -> [a] -> [b]
map [Doc ann] -> Doc ann
forall ann. [Doc ann] -> Doc ann
hsep
([[Doc ann]] -> [Doc ann])
-> (SpacedFingerprint -> [[Doc ann]])
-> SpacedFingerprint
-> [Doc ann]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> [Doc ann] -> [[Doc ann]]
forall e. Int -> [e] -> [[e]]
chunksOf Int
5
([Doc ann] -> [[Doc ann]])
-> (SpacedFingerprint -> [Doc ann])
-> SpacedFingerprint
-> [[Doc ann]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (String -> Doc ann) -> [String] -> [Doc ann]
forall a b. (a -> b) -> [a] -> [b]
map String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty
([String] -> [Doc ann])
-> (SpacedFingerprint -> [String])
-> SpacedFingerprint
-> [Doc ann]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> String -> [String]
forall e. Int -> [e] -> [[e]]
chunksOf Int
4
(String -> [String])
-> (SpacedFingerprint -> String) -> SpacedFingerprint -> [String]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> String
bsToHexUpper
(ByteString -> String)
-> (SpacedFingerprint -> ByteString) -> SpacedFingerprint -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Fingerprint -> ByteString
unFingerprint
(Fingerprint -> ByteString)
-> (SpacedFingerprint -> Fingerprint)
-> SpacedFingerprint
-> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped SpacedFingerprint -> SpacedFingerprint)
-> SpacedFingerprint -> Unwrapped SpacedFingerprint
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op Unwrapped SpacedFingerprint -> SpacedFingerprint
Fingerprint -> SpacedFingerprint
SpacedFingerprint
bsToHexUpper :: B.ByteString -> String
bsToHexUpper :: ByteString -> String
bsToHexUpper = (Char -> Char) -> ShowS
forall a b. (a -> b) -> [a] -> [b]
map Char -> Char
toUpper ShowS -> (ByteString -> String) -> ByteString -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> String
BC8.unpack (ByteString -> String)
-> (ByteString -> ByteString) -> ByteString -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> ByteString
B16.encode
hexToW8s :: ReadS Word8
hexToW8s :: ReadS Word8
hexToW8s = ReadS Word8 -> [String] -> [(Word8, String)]
forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
concatMap ReadS Word8
forall a. (Eq a, Num a) => ReadS a
readHex ([String] -> [(Word8, String)])
-> (String -> [String]) -> ReadS Word8
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> String -> [String]
forall e. Int -> [e] -> [[e]]
chunksOf Int
2 (String -> [String]) -> ShowS -> String -> [String]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Char -> Char) -> ShowS
forall a b. (a -> b) -> [a] -> [b]
map Char -> Char
toLower
newtype SignatureHash = SignatureHash {SignatureHash -> ByteString
unSignatureHash :: B.ByteString}
deriving (Typeable SignatureHash
Typeable SignatureHash =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SignatureHash -> c SignatureHash)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SignatureHash)
-> (SignatureHash -> Constr)
-> (SignatureHash -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SignatureHash))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SignatureHash))
-> ((forall b. Data b => b -> b) -> SignatureHash -> SignatureHash)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SignatureHash -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SignatureHash -> r)
-> (forall u. (forall d. Data d => d -> u) -> SignatureHash -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> SignatureHash -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SignatureHash -> m SignatureHash)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SignatureHash -> m SignatureHash)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SignatureHash -> m SignatureHash)
-> Data SignatureHash
SignatureHash -> Constr
SignatureHash -> DataType
(forall b. Data b => b -> b) -> SignatureHash -> SignatureHash
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> SignatureHash -> u
forall u. (forall d. Data d => d -> u) -> SignatureHash -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SignatureHash -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SignatureHash -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SignatureHash -> m SignatureHash
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SignatureHash -> m SignatureHash
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SignatureHash
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SignatureHash -> c SignatureHash
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SignatureHash)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SignatureHash)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SignatureHash -> c SignatureHash
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SignatureHash -> c SignatureHash
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SignatureHash
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SignatureHash
$ctoConstr :: SignatureHash -> Constr
toConstr :: SignatureHash -> Constr
$cdataTypeOf :: SignatureHash -> DataType
dataTypeOf :: SignatureHash -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SignatureHash)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SignatureHash)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SignatureHash)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SignatureHash)
$cgmapT :: (forall b. Data b => b -> b) -> SignatureHash -> SignatureHash
gmapT :: (forall b. Data b => b -> b) -> SignatureHash -> SignatureHash
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SignatureHash -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SignatureHash -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SignatureHash -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SignatureHash -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SignatureHash -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> SignatureHash -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SignatureHash -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SignatureHash -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SignatureHash -> m SignatureHash
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SignatureHash -> m SignatureHash
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SignatureHash -> m SignatureHash
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SignatureHash -> m SignatureHash
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SignatureHash -> m SignatureHash
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SignatureHash -> m SignatureHash
Data, SignatureHash -> SignatureHash -> Bool
(SignatureHash -> SignatureHash -> Bool)
-> (SignatureHash -> SignatureHash -> Bool) -> Eq SignatureHash
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SignatureHash -> SignatureHash -> Bool
== :: SignatureHash -> SignatureHash -> Bool
$c/= :: SignatureHash -> SignatureHash -> Bool
/= :: SignatureHash -> SignatureHash -> Bool
Eq, (forall x. SignatureHash -> Rep SignatureHash x)
-> (forall x. Rep SignatureHash x -> SignatureHash)
-> Generic SignatureHash
forall x. Rep SignatureHash x -> SignatureHash
forall x. SignatureHash -> Rep SignatureHash x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SignatureHash -> Rep SignatureHash x
from :: forall x. SignatureHash -> Rep SignatureHash x
$cto :: forall x. Rep SignatureHash x -> SignatureHash
to :: forall x. Rep SignatureHash x -> SignatureHash
Generic, Eq SignatureHash
Eq SignatureHash =>
(SignatureHash -> SignatureHash -> Ordering)
-> (SignatureHash -> SignatureHash -> Bool)
-> (SignatureHash -> SignatureHash -> Bool)
-> (SignatureHash -> SignatureHash -> Bool)
-> (SignatureHash -> SignatureHash -> Bool)
-> (SignatureHash -> SignatureHash -> SignatureHash)
-> (SignatureHash -> SignatureHash -> SignatureHash)
-> Ord SignatureHash
SignatureHash -> SignatureHash -> Bool
SignatureHash -> SignatureHash -> Ordering
SignatureHash -> SignatureHash -> SignatureHash
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: SignatureHash -> SignatureHash -> Ordering
compare :: SignatureHash -> SignatureHash -> Ordering
$c< :: SignatureHash -> SignatureHash -> Bool
< :: SignatureHash -> SignatureHash -> Bool
$c<= :: SignatureHash -> SignatureHash -> Bool
<= :: SignatureHash -> SignatureHash -> Bool
$c> :: SignatureHash -> SignatureHash -> Bool
> :: SignatureHash -> SignatureHash -> Bool
$c>= :: SignatureHash -> SignatureHash -> Bool
>= :: SignatureHash -> SignatureHash -> Bool
$cmax :: SignatureHash -> SignatureHash -> SignatureHash
max :: SignatureHash -> SignatureHash -> SignatureHash
$cmin :: SignatureHash -> SignatureHash -> SignatureHash
min :: SignatureHash -> SignatureHash -> SignatureHash
Ord, Int -> SignatureHash -> ShowS
[SignatureHash] -> ShowS
SignatureHash -> String
(Int -> SignatureHash -> ShowS)
-> (SignatureHash -> String)
-> ([SignatureHash] -> ShowS)
-> Show SignatureHash
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SignatureHash -> ShowS
showsPrec :: Int -> SignatureHash -> ShowS
$cshow :: SignatureHash -> String
show :: SignatureHash -> String
$cshowList :: [SignatureHash] -> ShowS
showList :: [SignatureHash] -> ShowS
Show, Typeable)
instance Wrapped SignatureHash
instance Hashable SignatureHash
instance Pretty SignatureHash where
pretty :: forall ann. SignatureHash -> Doc ann
pretty = ByteString -> Doc ann
forall ann. ByteString -> Doc ann
prettyBS (ByteString -> Doc ann)
-> (SignatureHash -> ByteString) -> SignatureHash -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped SignatureHash -> SignatureHash)
-> SignatureHash -> Unwrapped SignatureHash
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> SignatureHash
Unwrapped SignatureHash -> SignatureHash
SignatureHash
instance A.ToJSON SignatureHash where
toJSON :: SignatureHash -> Value
toJSON =
String -> Value
forall a. ToJSON a => a -> Value
A.toJSON
(String -> Value)
-> (SignatureHash -> String) -> SignatureHash -> Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> String
BLC8.unpack
(ByteString -> String)
-> (SignatureHash -> ByteString) -> SignatureHash -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> ByteString
BL.fromStrict
(ByteString -> ByteString)
-> (SignatureHash -> ByteString) -> SignatureHash -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Base -> ByteString -> ByteString
forall bin bout.
(ByteArrayAccess bin, ByteArray bout) =>
Base -> bin -> bout
convertToBase Base
Base64
(ByteString -> ByteString)
-> (SignatureHash -> ByteString) -> SignatureHash -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped SignatureHash -> SignatureHash)
-> SignatureHash -> Unwrapped SignatureHash
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> SignatureHash
Unwrapped SignatureHash -> SignatureHash
SignatureHash
instance A.FromJSON SignatureHash where
parseJSON :: Value -> Parser SignatureHash
parseJSON = String
-> (Text -> Parser SignatureHash) -> Value -> Parser SignatureHash
forall a. String -> (Text -> Parser a) -> Value -> Parser a
A.withText String
"SignatureHash" ((Text -> Parser SignatureHash) -> Value -> Parser SignatureHash)
-> (Text -> Parser SignatureHash) -> Value -> Parser SignatureHash
forall a b. (a -> b) -> a -> b
$ \Text
t ->
(String -> Parser SignatureHash)
-> (ByteString -> Parser SignatureHash)
-> Either String ByteString
-> Parser SignatureHash
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
either
String -> Parser SignatureHash
forall a. String -> Parser a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail
(SignatureHash -> Parser SignatureHash
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SignatureHash -> Parser SignatureHash)
-> (ByteString -> SignatureHash)
-> ByteString
-> Parser SignatureHash
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> SignatureHash
SignatureHash)
(Base -> ByteString -> Either String ByteString
forall bin bout.
(ByteArrayAccess bin, ByteArray bout) =>
Base -> bin -> Either String bout
convertFromBase Base
Base64 (Text -> ByteString
encodeUtf8 Text
t))
newtype FileName = FileName {FileName -> ByteString
unFileName :: B.ByteString}
deriving (Typeable FileName
Typeable FileName =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FileName -> c FileName)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FileName)
-> (FileName -> Constr)
-> (FileName -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c FileName))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FileName))
-> ((forall b. Data b => b -> b) -> FileName -> FileName)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FileName -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> FileName -> r)
-> (forall u. (forall d. Data d => d -> u) -> FileName -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> FileName -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> FileName -> m FileName)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FileName -> m FileName)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FileName -> m FileName)
-> Data FileName
FileName -> Constr
FileName -> DataType
(forall b. Data b => b -> b) -> FileName -> FileName
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> FileName -> u
forall u. (forall d. Data d => d -> u) -> FileName -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FileName -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> FileName -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> FileName -> m FileName
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FileName -> m FileName
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FileName
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FileName -> c FileName
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c FileName)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FileName)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FileName -> c FileName
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FileName -> c FileName
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FileName
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FileName
$ctoConstr :: FileName -> Constr
toConstr :: FileName -> Constr
$cdataTypeOf :: FileName -> DataType
dataTypeOf :: FileName -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c FileName)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c FileName)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FileName)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FileName)
$cgmapT :: (forall b. Data b => b -> b) -> FileName -> FileName
gmapT :: (forall b. Data b => b -> b) -> FileName -> FileName
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FileName -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FileName -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> FileName -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> FileName -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> FileName -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> FileName -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> FileName -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> FileName -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> FileName -> m FileName
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> FileName -> m FileName
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FileName -> m FileName
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FileName -> m FileName
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FileName -> m FileName
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FileName -> m FileName
Data, FileName -> FileName -> Bool
(FileName -> FileName -> Bool)
-> (FileName -> FileName -> Bool) -> Eq FileName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FileName -> FileName -> Bool
== :: FileName -> FileName -> Bool
$c/= :: FileName -> FileName -> Bool
/= :: FileName -> FileName -> Bool
Eq, (forall x. FileName -> Rep FileName x)
-> (forall x. Rep FileName x -> FileName) -> Generic FileName
forall x. Rep FileName x -> FileName
forall x. FileName -> Rep FileName x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. FileName -> Rep FileName x
from :: forall x. FileName -> Rep FileName x
$cto :: forall x. Rep FileName x -> FileName
to :: forall x. Rep FileName x -> FileName
Generic, Eq FileName
Eq FileName =>
(FileName -> FileName -> Ordering)
-> (FileName -> FileName -> Bool)
-> (FileName -> FileName -> Bool)
-> (FileName -> FileName -> Bool)
-> (FileName -> FileName -> Bool)
-> (FileName -> FileName -> FileName)
-> (FileName -> FileName -> FileName)
-> Ord FileName
FileName -> FileName -> Bool
FileName -> FileName -> Ordering
FileName -> FileName -> FileName
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: FileName -> FileName -> Ordering
compare :: FileName -> FileName -> Ordering
$c< :: FileName -> FileName -> Bool
< :: FileName -> FileName -> Bool
$c<= :: FileName -> FileName -> Bool
<= :: FileName -> FileName -> Bool
$c> :: FileName -> FileName -> Bool
> :: FileName -> FileName -> Bool
$c>= :: FileName -> FileName -> Bool
>= :: FileName -> FileName -> Bool
$cmax :: FileName -> FileName -> FileName
max :: FileName -> FileName -> FileName
$cmin :: FileName -> FileName -> FileName
min :: FileName -> FileName -> FileName
Ord, Int -> FileName -> ShowS
[FileName] -> ShowS
FileName -> String
(Int -> FileName -> ShowS)
-> (FileName -> String) -> ([FileName] -> ShowS) -> Show FileName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FileName -> ShowS
showsPrec :: Int -> FileName -> ShowS
$cshow :: FileName -> String
show :: FileName -> String
$cshowList :: [FileName] -> ShowS
showList :: [FileName] -> ShowS
Show, Typeable)
instance Wrapped FileName
instance Hashable FileName
instance Pretty FileName where
pretty :: forall ann. FileName -> Doc ann
pretty = ByteString -> Doc ann
forall ann. ByteString -> Doc ann
prettyBS (ByteString -> Doc ann)
-> (FileName -> ByteString) -> FileName -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped FileName -> FileName) -> FileName -> Unwrapped FileName
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> FileName
Unwrapped FileName -> FileName
FileName
instance A.ToJSON FileName where
toJSON :: FileName -> Value
toJSON = Text -> Value
forall a. ToJSON a => a -> Value
A.toJSON (Text -> Value) -> (FileName -> Text) -> FileName -> Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OnDecodeError -> ByteString -> Text
decodeUtf8With OnDecodeError
lenientDecode (ByteString -> Text)
-> (FileName -> ByteString) -> FileName -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped FileName -> FileName) -> FileName -> Unwrapped FileName
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> FileName
Unwrapped FileName -> FileName
FileName
instance A.FromJSON FileName where
parseJSON :: Value -> Parser FileName
parseJSON = String -> (Text -> Parser FileName) -> Value -> Parser FileName
forall a. String -> (Text -> Parser a) -> Value -> Parser a
A.withText String
"FileName" ((Text -> Parser FileName) -> Value -> Parser FileName)
-> (Text -> Parser FileName) -> Value -> Parser FileName
forall a b. (a -> b) -> a -> b
$ \Text
t ->
FileName -> Parser FileName
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (ByteString -> FileName
FileName (Text -> ByteString
encodeUtf8 Text
t))
newtype ImageData = ImageData {ImageData -> ByteString
unImageData :: ByteString}
deriving (Typeable ImageData
Typeable ImageData =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ImageData -> c ImageData)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ImageData)
-> (ImageData -> Constr)
-> (ImageData -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ImageData))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImageData))
-> ((forall b. Data b => b -> b) -> ImageData -> ImageData)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ImageData -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ImageData -> r)
-> (forall u. (forall d. Data d => d -> u) -> ImageData -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> ImageData -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ImageData -> m ImageData)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageData -> m ImageData)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageData -> m ImageData)
-> Data ImageData
ImageData -> Constr
ImageData -> DataType
(forall b. Data b => b -> b) -> ImageData -> ImageData
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ImageData -> u
forall u. (forall d. Data d => d -> u) -> ImageData -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ImageData -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ImageData -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ImageData -> m ImageData
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageData -> m ImageData
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ImageData
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ImageData -> c ImageData
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ImageData)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImageData)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ImageData -> c ImageData
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ImageData -> c ImageData
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ImageData
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ImageData
$ctoConstr :: ImageData -> Constr
toConstr :: ImageData -> Constr
$cdataTypeOf :: ImageData -> DataType
dataTypeOf :: ImageData -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ImageData)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ImageData)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImageData)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImageData)
$cgmapT :: (forall b. Data b => b -> b) -> ImageData -> ImageData
gmapT :: (forall b. Data b => b -> b) -> ImageData -> ImageData
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ImageData -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ImageData -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ImageData -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ImageData -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ImageData -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> ImageData -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ImageData -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ImageData -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ImageData -> m ImageData
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ImageData -> m ImageData
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageData -> m ImageData
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageData -> m ImageData
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageData -> m ImageData
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageData -> m ImageData
Data, ImageData -> ImageData -> Bool
(ImageData -> ImageData -> Bool)
-> (ImageData -> ImageData -> Bool) -> Eq ImageData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ImageData -> ImageData -> Bool
== :: ImageData -> ImageData -> Bool
$c/= :: ImageData -> ImageData -> Bool
/= :: ImageData -> ImageData -> Bool
Eq, (forall x. ImageData -> Rep ImageData x)
-> (forall x. Rep ImageData x -> ImageData) -> Generic ImageData
forall x. Rep ImageData x -> ImageData
forall x. ImageData -> Rep ImageData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. ImageData -> Rep ImageData x
from :: forall x. ImageData -> Rep ImageData x
$cto :: forall x. Rep ImageData x -> ImageData
to :: forall x. Rep ImageData x -> ImageData
Generic, Eq ImageData
Eq ImageData =>
(ImageData -> ImageData -> Ordering)
-> (ImageData -> ImageData -> Bool)
-> (ImageData -> ImageData -> Bool)
-> (ImageData -> ImageData -> Bool)
-> (ImageData -> ImageData -> Bool)
-> (ImageData -> ImageData -> ImageData)
-> (ImageData -> ImageData -> ImageData)
-> Ord ImageData
ImageData -> ImageData -> Bool
ImageData -> ImageData -> Ordering
ImageData -> ImageData -> ImageData
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: ImageData -> ImageData -> Ordering
compare :: ImageData -> ImageData -> Ordering
$c< :: ImageData -> ImageData -> Bool
< :: ImageData -> ImageData -> Bool
$c<= :: ImageData -> ImageData -> Bool
<= :: ImageData -> ImageData -> Bool
$c> :: ImageData -> ImageData -> Bool
> :: ImageData -> ImageData -> Bool
$c>= :: ImageData -> ImageData -> Bool
>= :: ImageData -> ImageData -> Bool
$cmax :: ImageData -> ImageData -> ImageData
max :: ImageData -> ImageData -> ImageData
$cmin :: ImageData -> ImageData -> ImageData
min :: ImageData -> ImageData -> ImageData
Ord, Int -> ImageData -> ShowS
[ImageData] -> ShowS
ImageData -> String
(Int -> ImageData -> ShowS)
-> (ImageData -> String)
-> ([ImageData] -> ShowS)
-> Show ImageData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ImageData -> ShowS
showsPrec :: Int -> ImageData -> ShowS
$cshow :: ImageData -> String
show :: ImageData -> String
$cshowList :: [ImageData] -> ShowS
showList :: [ImageData] -> ShowS
Show, Typeable)
instance Wrapped ImageData
instance Hashable ImageData
instance Pretty ImageData where
pretty :: forall ann. ImageData -> Doc ann
pretty = ByteString -> Doc ann
forall ann. ByteString -> Doc ann
prettyLBS (ByteString -> Doc ann)
-> (ImageData -> ByteString) -> ImageData -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped ImageData -> ImageData)
-> ImageData -> Unwrapped ImageData
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> ImageData
Unwrapped ImageData -> ImageData
ImageData
instance A.ToJSON ImageData where
toJSON :: ImageData -> Value
toJSON =
String -> Value
forall a. ToJSON a => a -> Value
A.toJSON
(String -> Value) -> (ImageData -> String) -> ImageData -> Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> String
BLC8.unpack
(ByteString -> String)
-> (ImageData -> ByteString) -> ImageData -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> ByteString
BL.fromStrict
(ByteString -> ByteString)
-> (ImageData -> ByteString) -> ImageData -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Base -> ByteString -> ByteString
forall bin bout.
(ByteArrayAccess bin, ByteArray bout) =>
Base -> bin -> bout
convertToBase Base
Base64
(ByteString -> ByteString)
-> (ImageData -> ByteString) -> ImageData -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> ByteString
BL.toStrict
(ByteString -> ByteString)
-> (ImageData -> ByteString) -> ImageData -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped ImageData -> ImageData)
-> ImageData -> Unwrapped ImageData
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> ImageData
Unwrapped ImageData -> ImageData
ImageData
instance A.FromJSON ImageData where
parseJSON :: Value -> Parser ImageData
parseJSON = String -> (Text -> Parser ImageData) -> Value -> Parser ImageData
forall a. String -> (Text -> Parser a) -> Value -> Parser a
A.withText String
"ImageData" ((Text -> Parser ImageData) -> Value -> Parser ImageData)
-> (Text -> Parser ImageData) -> Value -> Parser ImageData
forall a b. (a -> b) -> a -> b
$ \Text
t ->
(String -> Parser ImageData)
-> (ByteString -> Parser ImageData)
-> Either String ByteString
-> Parser ImageData
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
either
String -> Parser ImageData
forall a. String -> Parser a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail
(ImageData -> Parser ImageData
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (ImageData -> Parser ImageData)
-> (ByteString -> ImageData) -> ByteString -> Parser ImageData
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> ImageData
ImageData (ByteString -> ImageData)
-> (ByteString -> ByteString) -> ByteString -> ImageData
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> ByteString
BL.fromStrict)
(Base -> ByteString -> Either String ByteString
forall bin bout.
(ByteArrayAccess bin, ByteArray bout) =>
Base -> bin -> Either String bout
convertFromBase Base
Base64 (Text -> ByteString
encodeUtf8 Text
t))
newtype EightOctetKeyId
= EightOctetKeyId
{ EightOctetKeyId -> ByteString
unEOKI :: B.ByteString
}
deriving (Typeable EightOctetKeyId
Typeable EightOctetKeyId =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> EightOctetKeyId -> c EightOctetKeyId)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c EightOctetKeyId)
-> (EightOctetKeyId -> Constr)
-> (EightOctetKeyId -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c EightOctetKeyId))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c EightOctetKeyId))
-> ((forall b. Data b => b -> b)
-> EightOctetKeyId -> EightOctetKeyId)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> EightOctetKeyId -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> EightOctetKeyId -> r)
-> (forall u.
(forall d. Data d => d -> u) -> EightOctetKeyId -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> EightOctetKeyId -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> EightOctetKeyId -> m EightOctetKeyId)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> EightOctetKeyId -> m EightOctetKeyId)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> EightOctetKeyId -> m EightOctetKeyId)
-> Data EightOctetKeyId
EightOctetKeyId -> Constr
EightOctetKeyId -> DataType
(forall b. Data b => b -> b) -> EightOctetKeyId -> EightOctetKeyId
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> EightOctetKeyId -> u
forall u. (forall d. Data d => d -> u) -> EightOctetKeyId -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> EightOctetKeyId -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> EightOctetKeyId -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> EightOctetKeyId -> m EightOctetKeyId
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> EightOctetKeyId -> m EightOctetKeyId
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c EightOctetKeyId
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> EightOctetKeyId -> c EightOctetKeyId
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c EightOctetKeyId)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c EightOctetKeyId)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> EightOctetKeyId -> c EightOctetKeyId
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> EightOctetKeyId -> c EightOctetKeyId
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c EightOctetKeyId
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c EightOctetKeyId
$ctoConstr :: EightOctetKeyId -> Constr
toConstr :: EightOctetKeyId -> Constr
$cdataTypeOf :: EightOctetKeyId -> DataType
dataTypeOf :: EightOctetKeyId -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c EightOctetKeyId)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c EightOctetKeyId)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c EightOctetKeyId)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c EightOctetKeyId)
$cgmapT :: (forall b. Data b => b -> b) -> EightOctetKeyId -> EightOctetKeyId
gmapT :: (forall b. Data b => b -> b) -> EightOctetKeyId -> EightOctetKeyId
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> EightOctetKeyId -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> EightOctetKeyId -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> EightOctetKeyId -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> EightOctetKeyId -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> EightOctetKeyId -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> EightOctetKeyId -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> EightOctetKeyId -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> EightOctetKeyId -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> EightOctetKeyId -> m EightOctetKeyId
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> EightOctetKeyId -> m EightOctetKeyId
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> EightOctetKeyId -> m EightOctetKeyId
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> EightOctetKeyId -> m EightOctetKeyId
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> EightOctetKeyId -> m EightOctetKeyId
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> EightOctetKeyId -> m EightOctetKeyId
Data, EightOctetKeyId -> EightOctetKeyId -> Bool
(EightOctetKeyId -> EightOctetKeyId -> Bool)
-> (EightOctetKeyId -> EightOctetKeyId -> Bool)
-> Eq EightOctetKeyId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EightOctetKeyId -> EightOctetKeyId -> Bool
== :: EightOctetKeyId -> EightOctetKeyId -> Bool
$c/= :: EightOctetKeyId -> EightOctetKeyId -> Bool
/= :: EightOctetKeyId -> EightOctetKeyId -> Bool
Eq, (forall x. EightOctetKeyId -> Rep EightOctetKeyId x)
-> (forall x. Rep EightOctetKeyId x -> EightOctetKeyId)
-> Generic EightOctetKeyId
forall x. Rep EightOctetKeyId x -> EightOctetKeyId
forall x. EightOctetKeyId -> Rep EightOctetKeyId x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. EightOctetKeyId -> Rep EightOctetKeyId x
from :: forall x. EightOctetKeyId -> Rep EightOctetKeyId x
$cto :: forall x. Rep EightOctetKeyId x -> EightOctetKeyId
to :: forall x. Rep EightOctetKeyId x -> EightOctetKeyId
Generic, Eq EightOctetKeyId
Eq EightOctetKeyId =>
(EightOctetKeyId -> EightOctetKeyId -> Ordering)
-> (EightOctetKeyId -> EightOctetKeyId -> Bool)
-> (EightOctetKeyId -> EightOctetKeyId -> Bool)
-> (EightOctetKeyId -> EightOctetKeyId -> Bool)
-> (EightOctetKeyId -> EightOctetKeyId -> Bool)
-> (EightOctetKeyId -> EightOctetKeyId -> EightOctetKeyId)
-> (EightOctetKeyId -> EightOctetKeyId -> EightOctetKeyId)
-> Ord EightOctetKeyId
EightOctetKeyId -> EightOctetKeyId -> Bool
EightOctetKeyId -> EightOctetKeyId -> Ordering
EightOctetKeyId -> EightOctetKeyId -> EightOctetKeyId
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: EightOctetKeyId -> EightOctetKeyId -> Ordering
compare :: EightOctetKeyId -> EightOctetKeyId -> Ordering
$c< :: EightOctetKeyId -> EightOctetKeyId -> Bool
< :: EightOctetKeyId -> EightOctetKeyId -> Bool
$c<= :: EightOctetKeyId -> EightOctetKeyId -> Bool
<= :: EightOctetKeyId -> EightOctetKeyId -> Bool
$c> :: EightOctetKeyId -> EightOctetKeyId -> Bool
> :: EightOctetKeyId -> EightOctetKeyId -> Bool
$c>= :: EightOctetKeyId -> EightOctetKeyId -> Bool
>= :: EightOctetKeyId -> EightOctetKeyId -> Bool
$cmax :: EightOctetKeyId -> EightOctetKeyId -> EightOctetKeyId
max :: EightOctetKeyId -> EightOctetKeyId -> EightOctetKeyId
$cmin :: EightOctetKeyId -> EightOctetKeyId -> EightOctetKeyId
min :: EightOctetKeyId -> EightOctetKeyId -> EightOctetKeyId
Ord, Typeable)
instance Wrapped EightOctetKeyId
instance Pretty EightOctetKeyId where
pretty :: forall ann. EightOctetKeyId -> Doc ann
pretty = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (String -> Doc ann)
-> (EightOctetKeyId -> String) -> EightOctetKeyId -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> String
bsToHexUpper (ByteString -> String)
-> (EightOctetKeyId -> ByteString) -> EightOctetKeyId -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped EightOctetKeyId -> EightOctetKeyId)
-> EightOctetKeyId -> Unwrapped EightOctetKeyId
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> EightOctetKeyId
Unwrapped EightOctetKeyId -> EightOctetKeyId
EightOctetKeyId
instance Show EightOctetKeyId where
show :: EightOctetKeyId -> String
show = ByteString -> String
bsToHexUpper (ByteString -> String)
-> (EightOctetKeyId -> ByteString) -> EightOctetKeyId -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped EightOctetKeyId -> EightOctetKeyId)
-> EightOctetKeyId -> Unwrapped EightOctetKeyId
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> EightOctetKeyId
Unwrapped EightOctetKeyId -> EightOctetKeyId
EightOctetKeyId
instance Read EightOctetKeyId where
readsPrec :: Int -> ReadS EightOctetKeyId
readsPrec Int
_ =
([(Word8, String)] -> (EightOctetKeyId, String))
-> [[(Word8, String)]] -> [(EightOctetKeyId, String)]
forall a b. (a -> b) -> [a] -> [b]
map ((ByteString -> EightOctetKeyId
EightOctetKeyId (ByteString -> EightOctetKeyId)
-> ([Word8] -> ByteString) -> [Word8] -> EightOctetKeyId
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Word8] -> ByteString
B.pack ([Word8] -> EightOctetKeyId)
-> ([String] -> String)
-> ([Word8], [String])
-> (EightOctetKeyId, String)
forall b c b' c'. (b -> c) -> (b' -> c') -> (b, b') -> (c, c')
forall (a :: * -> * -> *) b c b' c'.
Arrow a =>
a b c -> a b' c' -> a (b, b') (c, c')
*** [String] -> String
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat) (([Word8], [String]) -> (EightOctetKeyId, String))
-> ([(Word8, String)] -> ([Word8], [String]))
-> [(Word8, String)]
-> (EightOctetKeyId, String)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [(Word8, String)] -> ([Word8], [String])
forall a b. [(a, b)] -> ([a], [b])
unzip)
([[(Word8, String)]] -> [(EightOctetKeyId, String)])
-> (String -> [[(Word8, String)]]) -> ReadS EightOctetKeyId
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> [(Word8, String)] -> [[(Word8, String)]]
forall e. Int -> [e] -> [[e]]
chunksOf Int
8
([(Word8, String)] -> [[(Word8, String)]])
-> ReadS Word8 -> String -> [[(Word8, String)]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ReadS Word8
hexToW8s
instance Hashable EightOctetKeyId
instance A.ToJSON EightOctetKeyId where
toJSON :: EightOctetKeyId -> Value
toJSON EightOctetKeyId
e =
[Pair] -> Value
object
[String -> Key
AK.fromString String
"eoki" Key -> String -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= (ByteString -> String
bsToHexUpper (ByteString -> String)
-> (EightOctetKeyId -> ByteString) -> EightOctetKeyId -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped EightOctetKeyId -> EightOctetKeyId)
-> EightOctetKeyId -> Unwrapped EightOctetKeyId
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> EightOctetKeyId
Unwrapped EightOctetKeyId -> EightOctetKeyId
EightOctetKeyId) EightOctetKeyId
e]
instance A.FromJSON EightOctetKeyId where
parseJSON :: Value -> Parser EightOctetKeyId
parseJSON (A.Object Object
v) =
ByteString -> EightOctetKeyId
EightOctetKeyId (ByteString -> EightOctetKeyId)
-> (String -> ByteString) -> String -> EightOctetKeyId
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> ByteString
forall a. Read a => String -> a
read (String -> EightOctetKeyId)
-> Parser String -> Parser EightOctetKeyId
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser String
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"eoki"
parseJSON Value
_ = Parser EightOctetKeyId
forall a. Parser a
forall (m :: * -> *) a. MonadPlus m => m a
mzero
data KeyIdentifier
= KeyIdentifierWildcard
| KeyIdentifierEightOctet EightOctetKeyId
| KeyIdentifierFingerprint Fingerprint
deriving (Typeable KeyIdentifier
Typeable KeyIdentifier =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KeyIdentifier -> c KeyIdentifier)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KeyIdentifier)
-> (KeyIdentifier -> Constr)
-> (KeyIdentifier -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KeyIdentifier))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c KeyIdentifier))
-> ((forall b. Data b => b -> b) -> KeyIdentifier -> KeyIdentifier)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KeyIdentifier -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> KeyIdentifier -> r)
-> (forall u. (forall d. Data d => d -> u) -> KeyIdentifier -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> KeyIdentifier -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KeyIdentifier -> m KeyIdentifier)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyIdentifier -> m KeyIdentifier)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyIdentifier -> m KeyIdentifier)
-> Data KeyIdentifier
KeyIdentifier -> Constr
KeyIdentifier -> DataType
(forall b. Data b => b -> b) -> KeyIdentifier -> KeyIdentifier
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> KeyIdentifier -> u
forall u. (forall d. Data d => d -> u) -> KeyIdentifier -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KeyIdentifier -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> KeyIdentifier -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KeyIdentifier -> m KeyIdentifier
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyIdentifier -> m KeyIdentifier
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KeyIdentifier
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KeyIdentifier -> c KeyIdentifier
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KeyIdentifier)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c KeyIdentifier)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KeyIdentifier -> c KeyIdentifier
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KeyIdentifier -> c KeyIdentifier
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KeyIdentifier
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KeyIdentifier
$ctoConstr :: KeyIdentifier -> Constr
toConstr :: KeyIdentifier -> Constr
$cdataTypeOf :: KeyIdentifier -> DataType
dataTypeOf :: KeyIdentifier -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KeyIdentifier)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KeyIdentifier)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c KeyIdentifier)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c KeyIdentifier)
$cgmapT :: (forall b. Data b => b -> b) -> KeyIdentifier -> KeyIdentifier
gmapT :: (forall b. Data b => b -> b) -> KeyIdentifier -> KeyIdentifier
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KeyIdentifier -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KeyIdentifier -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> KeyIdentifier -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> KeyIdentifier -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> KeyIdentifier -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> KeyIdentifier -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> KeyIdentifier -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> KeyIdentifier -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KeyIdentifier -> m KeyIdentifier
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KeyIdentifier -> m KeyIdentifier
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyIdentifier -> m KeyIdentifier
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyIdentifier -> m KeyIdentifier
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyIdentifier -> m KeyIdentifier
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyIdentifier -> m KeyIdentifier
Data, KeyIdentifier -> KeyIdentifier -> Bool
(KeyIdentifier -> KeyIdentifier -> Bool)
-> (KeyIdentifier -> KeyIdentifier -> Bool) -> Eq KeyIdentifier
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: KeyIdentifier -> KeyIdentifier -> Bool
== :: KeyIdentifier -> KeyIdentifier -> Bool
$c/= :: KeyIdentifier -> KeyIdentifier -> Bool
/= :: KeyIdentifier -> KeyIdentifier -> Bool
Eq, (forall x. KeyIdentifier -> Rep KeyIdentifier x)
-> (forall x. Rep KeyIdentifier x -> KeyIdentifier)
-> Generic KeyIdentifier
forall x. Rep KeyIdentifier x -> KeyIdentifier
forall x. KeyIdentifier -> Rep KeyIdentifier x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. KeyIdentifier -> Rep KeyIdentifier x
from :: forall x. KeyIdentifier -> Rep KeyIdentifier x
$cto :: forall x. Rep KeyIdentifier x -> KeyIdentifier
to :: forall x. Rep KeyIdentifier x -> KeyIdentifier
Generic, Eq KeyIdentifier
Eq KeyIdentifier =>
(KeyIdentifier -> KeyIdentifier -> Ordering)
-> (KeyIdentifier -> KeyIdentifier -> Bool)
-> (KeyIdentifier -> KeyIdentifier -> Bool)
-> (KeyIdentifier -> KeyIdentifier -> Bool)
-> (KeyIdentifier -> KeyIdentifier -> Bool)
-> (KeyIdentifier -> KeyIdentifier -> KeyIdentifier)
-> (KeyIdentifier -> KeyIdentifier -> KeyIdentifier)
-> Ord KeyIdentifier
KeyIdentifier -> KeyIdentifier -> Bool
KeyIdentifier -> KeyIdentifier -> Ordering
KeyIdentifier -> KeyIdentifier -> KeyIdentifier
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: KeyIdentifier -> KeyIdentifier -> Ordering
compare :: KeyIdentifier -> KeyIdentifier -> Ordering
$c< :: KeyIdentifier -> KeyIdentifier -> Bool
< :: KeyIdentifier -> KeyIdentifier -> Bool
$c<= :: KeyIdentifier -> KeyIdentifier -> Bool
<= :: KeyIdentifier -> KeyIdentifier -> Bool
$c> :: KeyIdentifier -> KeyIdentifier -> Bool
> :: KeyIdentifier -> KeyIdentifier -> Bool
$c>= :: KeyIdentifier -> KeyIdentifier -> Bool
>= :: KeyIdentifier -> KeyIdentifier -> Bool
$cmax :: KeyIdentifier -> KeyIdentifier -> KeyIdentifier
max :: KeyIdentifier -> KeyIdentifier -> KeyIdentifier
$cmin :: KeyIdentifier -> KeyIdentifier -> KeyIdentifier
min :: KeyIdentifier -> KeyIdentifier -> KeyIdentifier
Ord, Int -> KeyIdentifier -> ShowS
[KeyIdentifier] -> ShowS
KeyIdentifier -> String
(Int -> KeyIdentifier -> ShowS)
-> (KeyIdentifier -> String)
-> ([KeyIdentifier] -> ShowS)
-> Show KeyIdentifier
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> KeyIdentifier -> ShowS
showsPrec :: Int -> KeyIdentifier -> ShowS
$cshow :: KeyIdentifier -> String
show :: KeyIdentifier -> String
$cshowList :: [KeyIdentifier] -> ShowS
showList :: [KeyIdentifier] -> ShowS
Show, Typeable)
instance Pretty KeyIdentifier where
pretty :: forall ann. KeyIdentifier -> Doc ann
pretty KeyIdentifier
KeyIdentifierWildcard = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"wildcard"
pretty (KeyIdentifierEightOctet EightOctetKeyId
kid) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"key-id" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> EightOctetKeyId -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. EightOctetKeyId -> Doc ann
pretty EightOctetKeyId
kid
pretty (KeyIdentifierFingerprint Fingerprint
fp) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"fingerprint" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Fingerprint -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. Fingerprint -> Doc ann
pretty Fingerprint
fp
instance A.ToJSON KeyIdentifier where
toJSON :: KeyIdentifier -> Value
toJSON KeyIdentifier
KeyIdentifierWildcard =
[Pair] -> Value
object [String -> Key
AK.fromString String
"wildcard" Key -> Value -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Bool -> Value
A.Bool Bool
True]
toJSON (KeyIdentifierEightOctet EightOctetKeyId
kid) = [Pair] -> Value
object [String -> Key
AK.fromString String
"keyId" Key -> EightOctetKeyId -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= EightOctetKeyId
kid]
toJSON (KeyIdentifierFingerprint Fingerprint
fp) =
[Pair] -> Value
object [String -> Key
AK.fromString String
"fingerprint" Key -> Fingerprint -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Fingerprint
fp]
instance A.FromJSON KeyIdentifier where
parseJSON :: Value -> Parser KeyIdentifier
parseJSON (A.Object Object
v) =
( (Object
v Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"wildcard") Parser Bool
-> (Bool -> Parser KeyIdentifier) -> Parser KeyIdentifier
forall a b. Parser a -> (a -> Parser b) -> Parser b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Bool
isWildcard ->
if Bool
isWildcard
then KeyIdentifier -> Parser KeyIdentifier
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure KeyIdentifier
KeyIdentifierWildcard
else Parser KeyIdentifier
forall a. Parser a
forall (m :: * -> *) a. MonadPlus m => m a
mzero
)
Parser KeyIdentifier
-> Parser KeyIdentifier -> Parser KeyIdentifier
forall a. Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> (EightOctetKeyId -> KeyIdentifier
KeyIdentifierEightOctet (EightOctetKeyId -> KeyIdentifier)
-> Parser EightOctetKeyId -> Parser KeyIdentifier
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser EightOctetKeyId
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"keyId")
Parser KeyIdentifier
-> Parser KeyIdentifier -> Parser KeyIdentifier
forall a. Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> (Fingerprint -> KeyIdentifier
KeyIdentifierFingerprint (Fingerprint -> KeyIdentifier)
-> Parser Fingerprint -> Parser KeyIdentifier
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser Fingerprint
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"fingerprint")
parseJSON Value
_ = Parser KeyIdentifier
forall a. Parser a
forall (m :: * -> *) a. MonadPlus m => m a
mzero
newtype NotationName
= NotationName
{ NotationName -> ByteString
unNotationName :: ByteString
}
deriving (Typeable NotationName
Typeable NotationName =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotationName -> c NotationName)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotationName)
-> (NotationName -> Constr)
-> (NotationName -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotationName))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NotationName))
-> ((forall b. Data b => b -> b) -> NotationName -> NotationName)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotationName -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NotationName -> r)
-> (forall u. (forall d. Data d => d -> u) -> NotationName -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> NotationName -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotationName -> m NotationName)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationName -> m NotationName)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationName -> m NotationName)
-> Data NotationName
NotationName -> Constr
NotationName -> DataType
(forall b. Data b => b -> b) -> NotationName -> NotationName
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> NotationName -> u
forall u. (forall d. Data d => d -> u) -> NotationName -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotationName -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NotationName -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotationName -> m NotationName
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationName -> m NotationName
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotationName
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotationName -> c NotationName
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotationName)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NotationName)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotationName -> c NotationName
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotationName -> c NotationName
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotationName
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotationName
$ctoConstr :: NotationName -> Constr
toConstr :: NotationName -> Constr
$cdataTypeOf :: NotationName -> DataType
dataTypeOf :: NotationName -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotationName)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotationName)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NotationName)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NotationName)
$cgmapT :: (forall b. Data b => b -> b) -> NotationName -> NotationName
gmapT :: (forall b. Data b => b -> b) -> NotationName -> NotationName
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotationName -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotationName -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NotationName -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NotationName -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> NotationName -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> NotationName -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NotationName -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NotationName -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotationName -> m NotationName
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotationName -> m NotationName
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationName -> m NotationName
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationName -> m NotationName
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationName -> m NotationName
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationName -> m NotationName
Data, NotationName -> NotationName -> Bool
(NotationName -> NotationName -> Bool)
-> (NotationName -> NotationName -> Bool) -> Eq NotationName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NotationName -> NotationName -> Bool
== :: NotationName -> NotationName -> Bool
$c/= :: NotationName -> NotationName -> Bool
/= :: NotationName -> NotationName -> Bool
Eq, (forall x. NotationName -> Rep NotationName x)
-> (forall x. Rep NotationName x -> NotationName)
-> Generic NotationName
forall x. Rep NotationName x -> NotationName
forall x. NotationName -> Rep NotationName x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. NotationName -> Rep NotationName x
from :: forall x. NotationName -> Rep NotationName x
$cto :: forall x. Rep NotationName x -> NotationName
to :: forall x. Rep NotationName x -> NotationName
Generic, Eq NotationName
Eq NotationName =>
(Int -> NotationName -> Int)
-> (NotationName -> Int) -> Hashable NotationName
Int -> NotationName -> Int
NotationName -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> NotationName -> Int
hashWithSalt :: Int -> NotationName -> Int
$chash :: NotationName -> Int
hash :: NotationName -> Int
Hashable, Eq NotationName
Eq NotationName =>
(NotationName -> NotationName -> Ordering)
-> (NotationName -> NotationName -> Bool)
-> (NotationName -> NotationName -> Bool)
-> (NotationName -> NotationName -> Bool)
-> (NotationName -> NotationName -> Bool)
-> (NotationName -> NotationName -> NotationName)
-> (NotationName -> NotationName -> NotationName)
-> Ord NotationName
NotationName -> NotationName -> Bool
NotationName -> NotationName -> Ordering
NotationName -> NotationName -> NotationName
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: NotationName -> NotationName -> Ordering
compare :: NotationName -> NotationName -> Ordering
$c< :: NotationName -> NotationName -> Bool
< :: NotationName -> NotationName -> Bool
$c<= :: NotationName -> NotationName -> Bool
<= :: NotationName -> NotationName -> Bool
$c> :: NotationName -> NotationName -> Bool
> :: NotationName -> NotationName -> Bool
$c>= :: NotationName -> NotationName -> Bool
>= :: NotationName -> NotationName -> Bool
$cmax :: NotationName -> NotationName -> NotationName
max :: NotationName -> NotationName -> NotationName
$cmin :: NotationName -> NotationName -> NotationName
min :: NotationName -> NotationName -> NotationName
Ord, Int -> NotationName -> ShowS
[NotationName] -> ShowS
NotationName -> String
(Int -> NotationName -> ShowS)
-> (NotationName -> String)
-> ([NotationName] -> ShowS)
-> Show NotationName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NotationName -> ShowS
showsPrec :: Int -> NotationName -> ShowS
$cshow :: NotationName -> String
show :: NotationName -> String
$cshowList :: [NotationName] -> ShowS
showList :: [NotationName] -> ShowS
Show, Typeable)
instance Pretty NotationName where
pretty :: forall ann. NotationName -> Doc ann
pretty = ByteString -> Doc ann
forall ann. ByteString -> Doc ann
prettyLBS (ByteString -> Doc ann)
-> (NotationName -> ByteString) -> NotationName -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NotationName -> ByteString
unNotationName
instance Wrapped NotationName
instance A.ToJSON NotationName where
toJSON :: NotationName -> Value
toJSON NotationName
nn =
[Pair] -> Value
object
[String -> Key
AK.fromString String
"notationname" Key -> String -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= ByteString -> String
forall a. Show a => a -> String
show ((Unwrapped NotationName -> NotationName)
-> NotationName -> Unwrapped NotationName
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> NotationName
Unwrapped NotationName -> NotationName
NotationName NotationName
nn)]
instance A.FromJSON NotationName where
parseJSON :: Value -> Parser NotationName
parseJSON (A.Object Object
v) =
ByteString -> NotationName
NotationName (ByteString -> NotationName)
-> (String -> ByteString) -> String -> NotationName
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> ByteString
forall a. Read a => String -> a
read (String -> NotationName) -> Parser String -> Parser NotationName
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser String
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"notationname"
parseJSON Value
_ = Parser NotationName
forall a. Parser a
forall (m :: * -> *) a. MonadPlus m => m a
mzero
newtype NotationValue
= NotationValue
{ NotationValue -> ByteString
unNotationValue :: ByteString
}
deriving (Typeable NotationValue
Typeable NotationValue =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotationValue -> c NotationValue)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotationValue)
-> (NotationValue -> Constr)
-> (NotationValue -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotationValue))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NotationValue))
-> ((forall b. Data b => b -> b) -> NotationValue -> NotationValue)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotationValue -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NotationValue -> r)
-> (forall u. (forall d. Data d => d -> u) -> NotationValue -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> NotationValue -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotationValue -> m NotationValue)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationValue -> m NotationValue)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationValue -> m NotationValue)
-> Data NotationValue
NotationValue -> Constr
NotationValue -> DataType
(forall b. Data b => b -> b) -> NotationValue -> NotationValue
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> NotationValue -> u
forall u. (forall d. Data d => d -> u) -> NotationValue -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotationValue -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NotationValue -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotationValue -> m NotationValue
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationValue -> m NotationValue
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotationValue
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotationValue -> c NotationValue
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotationValue)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NotationValue)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotationValue -> c NotationValue
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotationValue -> c NotationValue
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotationValue
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotationValue
$ctoConstr :: NotationValue -> Constr
toConstr :: NotationValue -> Constr
$cdataTypeOf :: NotationValue -> DataType
dataTypeOf :: NotationValue -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotationValue)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotationValue)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NotationValue)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NotationValue)
$cgmapT :: (forall b. Data b => b -> b) -> NotationValue -> NotationValue
gmapT :: (forall b. Data b => b -> b) -> NotationValue -> NotationValue
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotationValue -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotationValue -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NotationValue -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NotationValue -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> NotationValue -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> NotationValue -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NotationValue -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NotationValue -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotationValue -> m NotationValue
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotationValue -> m NotationValue
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationValue -> m NotationValue
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationValue -> m NotationValue
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationValue -> m NotationValue
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotationValue -> m NotationValue
Data, NotationValue -> NotationValue -> Bool
(NotationValue -> NotationValue -> Bool)
-> (NotationValue -> NotationValue -> Bool) -> Eq NotationValue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NotationValue -> NotationValue -> Bool
== :: NotationValue -> NotationValue -> Bool
$c/= :: NotationValue -> NotationValue -> Bool
/= :: NotationValue -> NotationValue -> Bool
Eq, (forall x. NotationValue -> Rep NotationValue x)
-> (forall x. Rep NotationValue x -> NotationValue)
-> Generic NotationValue
forall x. Rep NotationValue x -> NotationValue
forall x. NotationValue -> Rep NotationValue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. NotationValue -> Rep NotationValue x
from :: forall x. NotationValue -> Rep NotationValue x
$cto :: forall x. Rep NotationValue x -> NotationValue
to :: forall x. Rep NotationValue x -> NotationValue
Generic, Eq NotationValue
Eq NotationValue =>
(Int -> NotationValue -> Int)
-> (NotationValue -> Int) -> Hashable NotationValue
Int -> NotationValue -> Int
NotationValue -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> NotationValue -> Int
hashWithSalt :: Int -> NotationValue -> Int
$chash :: NotationValue -> Int
hash :: NotationValue -> Int
Hashable, Eq NotationValue
Eq NotationValue =>
(NotationValue -> NotationValue -> Ordering)
-> (NotationValue -> NotationValue -> Bool)
-> (NotationValue -> NotationValue -> Bool)
-> (NotationValue -> NotationValue -> Bool)
-> (NotationValue -> NotationValue -> Bool)
-> (NotationValue -> NotationValue -> NotationValue)
-> (NotationValue -> NotationValue -> NotationValue)
-> Ord NotationValue
NotationValue -> NotationValue -> Bool
NotationValue -> NotationValue -> Ordering
NotationValue -> NotationValue -> NotationValue
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: NotationValue -> NotationValue -> Ordering
compare :: NotationValue -> NotationValue -> Ordering
$c< :: NotationValue -> NotationValue -> Bool
< :: NotationValue -> NotationValue -> Bool
$c<= :: NotationValue -> NotationValue -> Bool
<= :: NotationValue -> NotationValue -> Bool
$c> :: NotationValue -> NotationValue -> Bool
> :: NotationValue -> NotationValue -> Bool
$c>= :: NotationValue -> NotationValue -> Bool
>= :: NotationValue -> NotationValue -> Bool
$cmax :: NotationValue -> NotationValue -> NotationValue
max :: NotationValue -> NotationValue -> NotationValue
$cmin :: NotationValue -> NotationValue -> NotationValue
min :: NotationValue -> NotationValue -> NotationValue
Ord, Int -> NotationValue -> ShowS
[NotationValue] -> ShowS
NotationValue -> String
(Int -> NotationValue -> ShowS)
-> (NotationValue -> String)
-> ([NotationValue] -> ShowS)
-> Show NotationValue
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NotationValue -> ShowS
showsPrec :: Int -> NotationValue -> ShowS
$cshow :: NotationValue -> String
show :: NotationValue -> String
$cshowList :: [NotationValue] -> ShowS
showList :: [NotationValue] -> ShowS
Show, Typeable)
instance Pretty NotationValue where
pretty :: forall ann. NotationValue -> Doc ann
pretty = ByteString -> Doc ann
forall ann. ByteString -> Doc ann
prettyLBS (ByteString -> Doc ann)
-> (NotationValue -> ByteString) -> NotationValue -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NotationValue -> ByteString
unNotationValue
instance Wrapped NotationValue
instance A.ToJSON NotationValue where
toJSON :: NotationValue -> Value
toJSON NotationValue
nv =
[Pair] -> Value
object
[String -> Key
AK.fromString String
"notationvalue" Key -> String -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= ByteString -> String
forall a. Show a => a -> String
show ((Unwrapped NotationValue -> NotationValue)
-> NotationValue -> Unwrapped NotationValue
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> NotationValue
Unwrapped NotationValue -> NotationValue
NotationValue NotationValue
nv)]
instance A.FromJSON NotationValue where
parseJSON :: Value -> Parser NotationValue
parseJSON (A.Object Object
v) =
ByteString -> NotationValue
NotationValue (ByteString -> NotationValue)
-> (String -> ByteString) -> String -> NotationValue
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> ByteString
forall a. Read a => String -> a
read (String -> NotationValue) -> Parser String -> Parser NotationValue
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser String
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"notationvalue"
parseJSON Value
_ = Parser NotationValue
forall a. Parser a
forall (m :: * -> *) a. MonadPlus m => m a
mzero
data HashAlgorithm
= DeprecatedMD5
| SHA1
| RIPEMD160
| SHA256
| SHA384
| SHA512
| SHA224
| SHA3_256
| SHA3_512
| OtherHA Word8
deriving (Typeable HashAlgorithm
Typeable HashAlgorithm =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> HashAlgorithm -> c HashAlgorithm)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c HashAlgorithm)
-> (HashAlgorithm -> Constr)
-> (HashAlgorithm -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c HashAlgorithm))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c HashAlgorithm))
-> ((forall b. Data b => b -> b) -> HashAlgorithm -> HashAlgorithm)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> HashAlgorithm -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> HashAlgorithm -> r)
-> (forall u. (forall d. Data d => d -> u) -> HashAlgorithm -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> HashAlgorithm -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> HashAlgorithm -> m HashAlgorithm)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> HashAlgorithm -> m HashAlgorithm)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> HashAlgorithm -> m HashAlgorithm)
-> Data HashAlgorithm
HashAlgorithm -> Constr
HashAlgorithm -> DataType
(forall b. Data b => b -> b) -> HashAlgorithm -> HashAlgorithm
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> HashAlgorithm -> u
forall u. (forall d. Data d => d -> u) -> HashAlgorithm -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> HashAlgorithm -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> HashAlgorithm -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> HashAlgorithm -> m HashAlgorithm
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> HashAlgorithm -> m HashAlgorithm
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c HashAlgorithm
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> HashAlgorithm -> c HashAlgorithm
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c HashAlgorithm)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c HashAlgorithm)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> HashAlgorithm -> c HashAlgorithm
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> HashAlgorithm -> c HashAlgorithm
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c HashAlgorithm
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c HashAlgorithm
$ctoConstr :: HashAlgorithm -> Constr
toConstr :: HashAlgorithm -> Constr
$cdataTypeOf :: HashAlgorithm -> DataType
dataTypeOf :: HashAlgorithm -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c HashAlgorithm)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c HashAlgorithm)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c HashAlgorithm)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c HashAlgorithm)
$cgmapT :: (forall b. Data b => b -> b) -> HashAlgorithm -> HashAlgorithm
gmapT :: (forall b. Data b => b -> b) -> HashAlgorithm -> HashAlgorithm
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> HashAlgorithm -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> HashAlgorithm -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> HashAlgorithm -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> HashAlgorithm -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> HashAlgorithm -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> HashAlgorithm -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> HashAlgorithm -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> HashAlgorithm -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> HashAlgorithm -> m HashAlgorithm
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> HashAlgorithm -> m HashAlgorithm
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> HashAlgorithm -> m HashAlgorithm
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> HashAlgorithm -> m HashAlgorithm
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> HashAlgorithm -> m HashAlgorithm
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> HashAlgorithm -> m HashAlgorithm
Data, (forall x. HashAlgorithm -> Rep HashAlgorithm x)
-> (forall x. Rep HashAlgorithm x -> HashAlgorithm)
-> Generic HashAlgorithm
forall x. Rep HashAlgorithm x -> HashAlgorithm
forall x. HashAlgorithm -> Rep HashAlgorithm x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. HashAlgorithm -> Rep HashAlgorithm x
from :: forall x. HashAlgorithm -> Rep HashAlgorithm x
$cto :: forall x. Rep HashAlgorithm x -> HashAlgorithm
to :: forall x. Rep HashAlgorithm x -> HashAlgorithm
Generic, Int -> HashAlgorithm -> ShowS
[HashAlgorithm] -> ShowS
HashAlgorithm -> String
(Int -> HashAlgorithm -> ShowS)
-> (HashAlgorithm -> String)
-> ([HashAlgorithm] -> ShowS)
-> Show HashAlgorithm
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> HashAlgorithm -> ShowS
showsPrec :: Int -> HashAlgorithm -> ShowS
$cshow :: HashAlgorithm -> String
show :: HashAlgorithm -> String
$cshowList :: [HashAlgorithm] -> ShowS
showList :: [HashAlgorithm] -> ShowS
Show, Typeable)
instance Eq HashAlgorithm where
== :: HashAlgorithm -> HashAlgorithm -> Bool
(==) HashAlgorithm
a HashAlgorithm
b = HashAlgorithm -> Word8
forall a. FutureVal a => a -> Word8
fromFVal HashAlgorithm
a Word8 -> Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== HashAlgorithm -> Word8
forall a. FutureVal a => a -> Word8
fromFVal HashAlgorithm
b
instance Ord HashAlgorithm where
compare :: HashAlgorithm -> HashAlgorithm -> Ordering
compare = (HashAlgorithm -> Word8)
-> HashAlgorithm -> HashAlgorithm -> Ordering
forall a b. Ord a => (b -> a) -> b -> b -> Ordering
comparing HashAlgorithm -> Word8
forall a. FutureVal a => a -> Word8
fromFVal
instance FutureVal HashAlgorithm where
fromFVal :: HashAlgorithm -> Word8
fromFVal HashAlgorithm
DeprecatedMD5 = Word8
1
fromFVal HashAlgorithm
SHA1 = Word8
2
fromFVal HashAlgorithm
RIPEMD160 = Word8
3
fromFVal HashAlgorithm
SHA256 = Word8
8
fromFVal HashAlgorithm
SHA384 = Word8
9
fromFVal HashAlgorithm
SHA512 = Word8
10
fromFVal HashAlgorithm
SHA224 = Word8
11
fromFVal HashAlgorithm
SHA3_256 = Word8
12
fromFVal HashAlgorithm
SHA3_512 = Word8
14
fromFVal (OtherHA Word8
o) = Word8
o
toFVal :: Word8 -> HashAlgorithm
toFVal Word8
1 = HashAlgorithm
DeprecatedMD5
toFVal Word8
2 = HashAlgorithm
SHA1
toFVal Word8
3 = HashAlgorithm
RIPEMD160
toFVal Word8
8 = HashAlgorithm
SHA256
toFVal Word8
9 = HashAlgorithm
SHA384
toFVal Word8
10 = HashAlgorithm
SHA512
toFVal Word8
11 = HashAlgorithm
SHA224
toFVal Word8
12 = HashAlgorithm
SHA3_256
toFVal Word8
14 = HashAlgorithm
SHA3_512
toFVal Word8
o = Word8 -> HashAlgorithm
OtherHA Word8
o
instance Hashable HashAlgorithm
instance Pretty HashAlgorithm where
pretty :: forall ann. HashAlgorithm -> Doc ann
pretty HashAlgorithm
DeprecatedMD5 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"(deprecated) MD5"
pretty HashAlgorithm
SHA1 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"SHA-1"
pretty HashAlgorithm
RIPEMD160 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"RIPEMD-160"
pretty HashAlgorithm
SHA256 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"SHA-256"
pretty HashAlgorithm
SHA384 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"SHA-384"
pretty HashAlgorithm
SHA512 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"SHA-512"
pretty HashAlgorithm
SHA224 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"SHA-224"
pretty HashAlgorithm
SHA3_256 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"SHA3-256"
pretty HashAlgorithm
SHA3_512 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"SHA3-512"
pretty (OtherHA Word8
ha) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"unknown hash algorithm type" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
ha
$(ATH.deriveJSON ATH.defaultOptions ''HashAlgorithm)
data CompressionAlgorithm
= Uncompressed
| ZIP
| ZLIB
| BZip2
| OtherCA Word8
deriving (Typeable CompressionAlgorithm
Typeable CompressionAlgorithm =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CompressionAlgorithm
-> c CompressionAlgorithm)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CompressionAlgorithm)
-> (CompressionAlgorithm -> Constr)
-> (CompressionAlgorithm -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CompressionAlgorithm))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CompressionAlgorithm))
-> ((forall b. Data b => b -> b)
-> CompressionAlgorithm -> CompressionAlgorithm)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CompressionAlgorithm -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CompressionAlgorithm -> r)
-> (forall u.
(forall d. Data d => d -> u) -> CompressionAlgorithm -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> CompressionAlgorithm -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CompressionAlgorithm -> m CompressionAlgorithm)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CompressionAlgorithm -> m CompressionAlgorithm)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CompressionAlgorithm -> m CompressionAlgorithm)
-> Data CompressionAlgorithm
CompressionAlgorithm -> Constr
CompressionAlgorithm -> DataType
(forall b. Data b => b -> b)
-> CompressionAlgorithm -> CompressionAlgorithm
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> CompressionAlgorithm -> u
forall u.
(forall d. Data d => d -> u) -> CompressionAlgorithm -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CompressionAlgorithm -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CompressionAlgorithm -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CompressionAlgorithm -> m CompressionAlgorithm
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CompressionAlgorithm -> m CompressionAlgorithm
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CompressionAlgorithm
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CompressionAlgorithm
-> c CompressionAlgorithm
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CompressionAlgorithm)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CompressionAlgorithm)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CompressionAlgorithm
-> c CompressionAlgorithm
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CompressionAlgorithm
-> c CompressionAlgorithm
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CompressionAlgorithm
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CompressionAlgorithm
$ctoConstr :: CompressionAlgorithm -> Constr
toConstr :: CompressionAlgorithm -> Constr
$cdataTypeOf :: CompressionAlgorithm -> DataType
dataTypeOf :: CompressionAlgorithm -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CompressionAlgorithm)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CompressionAlgorithm)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CompressionAlgorithm)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CompressionAlgorithm)
$cgmapT :: (forall b. Data b => b -> b)
-> CompressionAlgorithm -> CompressionAlgorithm
gmapT :: (forall b. Data b => b -> b)
-> CompressionAlgorithm -> CompressionAlgorithm
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CompressionAlgorithm -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CompressionAlgorithm -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CompressionAlgorithm -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CompressionAlgorithm -> r
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> CompressionAlgorithm -> [u]
gmapQ :: forall u.
(forall d. Data d => d -> u) -> CompressionAlgorithm -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> CompressionAlgorithm -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> CompressionAlgorithm -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CompressionAlgorithm -> m CompressionAlgorithm
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CompressionAlgorithm -> m CompressionAlgorithm
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CompressionAlgorithm -> m CompressionAlgorithm
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CompressionAlgorithm -> m CompressionAlgorithm
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CompressionAlgorithm -> m CompressionAlgorithm
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CompressionAlgorithm -> m CompressionAlgorithm
Data, (forall x. CompressionAlgorithm -> Rep CompressionAlgorithm x)
-> (forall x. Rep CompressionAlgorithm x -> CompressionAlgorithm)
-> Generic CompressionAlgorithm
forall x. Rep CompressionAlgorithm x -> CompressionAlgorithm
forall x. CompressionAlgorithm -> Rep CompressionAlgorithm x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. CompressionAlgorithm -> Rep CompressionAlgorithm x
from :: forall x. CompressionAlgorithm -> Rep CompressionAlgorithm x
$cto :: forall x. Rep CompressionAlgorithm x -> CompressionAlgorithm
to :: forall x. Rep CompressionAlgorithm x -> CompressionAlgorithm
Generic, Int -> CompressionAlgorithm -> ShowS
[CompressionAlgorithm] -> ShowS
CompressionAlgorithm -> String
(Int -> CompressionAlgorithm -> ShowS)
-> (CompressionAlgorithm -> String)
-> ([CompressionAlgorithm] -> ShowS)
-> Show CompressionAlgorithm
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CompressionAlgorithm -> ShowS
showsPrec :: Int -> CompressionAlgorithm -> ShowS
$cshow :: CompressionAlgorithm -> String
show :: CompressionAlgorithm -> String
$cshowList :: [CompressionAlgorithm] -> ShowS
showList :: [CompressionAlgorithm] -> ShowS
Show, Typeable)
instance Eq CompressionAlgorithm where
== :: CompressionAlgorithm -> CompressionAlgorithm -> Bool
(==) CompressionAlgorithm
a CompressionAlgorithm
b = CompressionAlgorithm -> Word8
forall a. FutureVal a => a -> Word8
fromFVal CompressionAlgorithm
a Word8 -> Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== CompressionAlgorithm -> Word8
forall a. FutureVal a => a -> Word8
fromFVal CompressionAlgorithm
b
instance Ord CompressionAlgorithm where
compare :: CompressionAlgorithm -> CompressionAlgorithm -> Ordering
compare = (CompressionAlgorithm -> Word8)
-> CompressionAlgorithm -> CompressionAlgorithm -> Ordering
forall a b. Ord a => (b -> a) -> b -> b -> Ordering
comparing CompressionAlgorithm -> Word8
forall a. FutureVal a => a -> Word8
fromFVal
instance FutureVal CompressionAlgorithm where
fromFVal :: CompressionAlgorithm -> Word8
fromFVal CompressionAlgorithm
Uncompressed = Word8
0
fromFVal CompressionAlgorithm
ZIP = Word8
1
fromFVal CompressionAlgorithm
ZLIB = Word8
2
fromFVal CompressionAlgorithm
BZip2 = Word8
3
fromFVal (OtherCA Word8
o) = Word8
o
toFVal :: Word8 -> CompressionAlgorithm
toFVal Word8
0 = CompressionAlgorithm
Uncompressed
toFVal Word8
1 = CompressionAlgorithm
ZIP
toFVal Word8
2 = CompressionAlgorithm
ZLIB
toFVal Word8
3 = CompressionAlgorithm
BZip2
toFVal Word8
o = Word8 -> CompressionAlgorithm
OtherCA Word8
o
instance Hashable CompressionAlgorithm
instance Pretty CompressionAlgorithm where
pretty :: forall ann. CompressionAlgorithm -> Doc ann
pretty CompressionAlgorithm
Uncompressed = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"uncompressed"
pretty CompressionAlgorithm
ZIP = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"ZIP"
pretty CompressionAlgorithm
ZLIB = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"zlib"
pretty CompressionAlgorithm
BZip2 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"bzip2"
pretty (OtherCA Word8
ca) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"unknown compression algorithm type" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
ca
$(ATH.deriveJSON ATH.defaultOptions ''CompressionAlgorithm)
data AEADAlgorithm
= EAX
| OCB
| GCM
| OtherAEADAlgo Word8
deriving (Typeable AEADAlgorithm
Typeable AEADAlgorithm =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> AEADAlgorithm -> c AEADAlgorithm)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c AEADAlgorithm)
-> (AEADAlgorithm -> Constr)
-> (AEADAlgorithm -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c AEADAlgorithm))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c AEADAlgorithm))
-> ((forall b. Data b => b -> b) -> AEADAlgorithm -> AEADAlgorithm)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> AEADAlgorithm -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> AEADAlgorithm -> r)
-> (forall u. (forall d. Data d => d -> u) -> AEADAlgorithm -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> AEADAlgorithm -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> AEADAlgorithm -> m AEADAlgorithm)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> AEADAlgorithm -> m AEADAlgorithm)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> AEADAlgorithm -> m AEADAlgorithm)
-> Data AEADAlgorithm
AEADAlgorithm -> Constr
AEADAlgorithm -> DataType
(forall b. Data b => b -> b) -> AEADAlgorithm -> AEADAlgorithm
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> AEADAlgorithm -> u
forall u. (forall d. Data d => d -> u) -> AEADAlgorithm -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> AEADAlgorithm -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> AEADAlgorithm -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> AEADAlgorithm -> m AEADAlgorithm
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> AEADAlgorithm -> m AEADAlgorithm
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c AEADAlgorithm
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> AEADAlgorithm -> c AEADAlgorithm
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c AEADAlgorithm)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c AEADAlgorithm)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> AEADAlgorithm -> c AEADAlgorithm
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> AEADAlgorithm -> c AEADAlgorithm
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c AEADAlgorithm
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c AEADAlgorithm
$ctoConstr :: AEADAlgorithm -> Constr
toConstr :: AEADAlgorithm -> Constr
$cdataTypeOf :: AEADAlgorithm -> DataType
dataTypeOf :: AEADAlgorithm -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c AEADAlgorithm)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c AEADAlgorithm)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c AEADAlgorithm)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c AEADAlgorithm)
$cgmapT :: (forall b. Data b => b -> b) -> AEADAlgorithm -> AEADAlgorithm
gmapT :: (forall b. Data b => b -> b) -> AEADAlgorithm -> AEADAlgorithm
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> AEADAlgorithm -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> AEADAlgorithm -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> AEADAlgorithm -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> AEADAlgorithm -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> AEADAlgorithm -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> AEADAlgorithm -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> AEADAlgorithm -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> AEADAlgorithm -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> AEADAlgorithm -> m AEADAlgorithm
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> AEADAlgorithm -> m AEADAlgorithm
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> AEADAlgorithm -> m AEADAlgorithm
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> AEADAlgorithm -> m AEADAlgorithm
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> AEADAlgorithm -> m AEADAlgorithm
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> AEADAlgorithm -> m AEADAlgorithm
Data, (forall x. AEADAlgorithm -> Rep AEADAlgorithm x)
-> (forall x. Rep AEADAlgorithm x -> AEADAlgorithm)
-> Generic AEADAlgorithm
forall x. Rep AEADAlgorithm x -> AEADAlgorithm
forall x. AEADAlgorithm -> Rep AEADAlgorithm x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. AEADAlgorithm -> Rep AEADAlgorithm x
from :: forall x. AEADAlgorithm -> Rep AEADAlgorithm x
$cto :: forall x. Rep AEADAlgorithm x -> AEADAlgorithm
to :: forall x. Rep AEADAlgorithm x -> AEADAlgorithm
Generic, Int -> AEADAlgorithm -> ShowS
[AEADAlgorithm] -> ShowS
AEADAlgorithm -> String
(Int -> AEADAlgorithm -> ShowS)
-> (AEADAlgorithm -> String)
-> ([AEADAlgorithm] -> ShowS)
-> Show AEADAlgorithm
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AEADAlgorithm -> ShowS
showsPrec :: Int -> AEADAlgorithm -> ShowS
$cshow :: AEADAlgorithm -> String
show :: AEADAlgorithm -> String
$cshowList :: [AEADAlgorithm] -> ShowS
showList :: [AEADAlgorithm] -> ShowS
Show, Typeable)
instance Eq AEADAlgorithm where
== :: AEADAlgorithm -> AEADAlgorithm -> Bool
(==) AEADAlgorithm
a AEADAlgorithm
b = AEADAlgorithm -> Word8
forall a. FutureVal a => a -> Word8
fromFVal AEADAlgorithm
a Word8 -> Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== AEADAlgorithm -> Word8
forall a. FutureVal a => a -> Word8
fromFVal AEADAlgorithm
b
instance Ord AEADAlgorithm where
compare :: AEADAlgorithm -> AEADAlgorithm -> Ordering
compare = (AEADAlgorithm -> Word8)
-> AEADAlgorithm -> AEADAlgorithm -> Ordering
forall a b. Ord a => (b -> a) -> b -> b -> Ordering
comparing AEADAlgorithm -> Word8
forall a. FutureVal a => a -> Word8
fromFVal
instance FutureVal AEADAlgorithm where
fromFVal :: AEADAlgorithm -> Word8
fromFVal AEADAlgorithm
EAX = Word8
1
fromFVal AEADAlgorithm
OCB = Word8
2
fromFVal AEADAlgorithm
GCM = Word8
3
fromFVal (OtherAEADAlgo Word8
o) = Word8
o
toFVal :: Word8 -> AEADAlgorithm
toFVal Word8
1 = AEADAlgorithm
EAX
toFVal Word8
2 = AEADAlgorithm
OCB
toFVal Word8
3 = AEADAlgorithm
GCM
toFVal Word8
o = Word8 -> AEADAlgorithm
OtherAEADAlgo Word8
o
instance Hashable AEADAlgorithm
instance Pretty AEADAlgorithm where
pretty :: forall ann. AEADAlgorithm -> Doc ann
pretty AEADAlgorithm
EAX = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"EAX"
pretty AEADAlgorithm
OCB = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"OCB"
pretty AEADAlgorithm
GCM = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"GCM"
pretty (OtherAEADAlgo Word8
aa) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"unknown AEAD algorithm type" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
aa
$(ATH.deriveJSON ATH.defaultOptions ''AEADAlgorithm)
data KSPFlag
= NoModify
| KSPOther Int
deriving (Typeable KSPFlag
Typeable KSPFlag =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KSPFlag -> c KSPFlag)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KSPFlag)
-> (KSPFlag -> Constr)
-> (KSPFlag -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KSPFlag))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KSPFlag))
-> ((forall b. Data b => b -> b) -> KSPFlag -> KSPFlag)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KSPFlag -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> KSPFlag -> r)
-> (forall u. (forall d. Data d => d -> u) -> KSPFlag -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> KSPFlag -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KSPFlag -> m KSPFlag)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KSPFlag -> m KSPFlag)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KSPFlag -> m KSPFlag)
-> Data KSPFlag
KSPFlag -> Constr
KSPFlag -> DataType
(forall b. Data b => b -> b) -> KSPFlag -> KSPFlag
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> KSPFlag -> u
forall u. (forall d. Data d => d -> u) -> KSPFlag -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KSPFlag -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> KSPFlag -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KSPFlag -> m KSPFlag
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KSPFlag -> m KSPFlag
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KSPFlag
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KSPFlag -> c KSPFlag
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KSPFlag)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KSPFlag)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KSPFlag -> c KSPFlag
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KSPFlag -> c KSPFlag
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KSPFlag
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KSPFlag
$ctoConstr :: KSPFlag -> Constr
toConstr :: KSPFlag -> Constr
$cdataTypeOf :: KSPFlag -> DataType
dataTypeOf :: KSPFlag -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KSPFlag)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KSPFlag)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KSPFlag)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KSPFlag)
$cgmapT :: (forall b. Data b => b -> b) -> KSPFlag -> KSPFlag
gmapT :: (forall b. Data b => b -> b) -> KSPFlag -> KSPFlag
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KSPFlag -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KSPFlag -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> KSPFlag -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> KSPFlag -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> KSPFlag -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> KSPFlag -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> KSPFlag -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> KSPFlag -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KSPFlag -> m KSPFlag
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KSPFlag -> m KSPFlag
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KSPFlag -> m KSPFlag
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KSPFlag -> m KSPFlag
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KSPFlag -> m KSPFlag
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KSPFlag -> m KSPFlag
Data, (forall x. KSPFlag -> Rep KSPFlag x)
-> (forall x. Rep KSPFlag x -> KSPFlag) -> Generic KSPFlag
forall x. Rep KSPFlag x -> KSPFlag
forall x. KSPFlag -> Rep KSPFlag x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. KSPFlag -> Rep KSPFlag x
from :: forall x. KSPFlag -> Rep KSPFlag x
$cto :: forall x. Rep KSPFlag x -> KSPFlag
to :: forall x. Rep KSPFlag x -> KSPFlag
Generic, Int -> KSPFlag -> ShowS
[KSPFlag] -> ShowS
KSPFlag -> String
(Int -> KSPFlag -> ShowS)
-> (KSPFlag -> String) -> ([KSPFlag] -> ShowS) -> Show KSPFlag
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> KSPFlag -> ShowS
showsPrec :: Int -> KSPFlag -> ShowS
$cshow :: KSPFlag -> String
show :: KSPFlag -> String
$cshowList :: [KSPFlag] -> ShowS
showList :: [KSPFlag] -> ShowS
Show, Typeable)
instance Eq KSPFlag where
== :: KSPFlag -> KSPFlag -> Bool
(==) KSPFlag
a KSPFlag
b = KSPFlag -> Int
forall a. FutureFlag a => a -> Int
fromFFlag KSPFlag
a Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== KSPFlag -> Int
forall a. FutureFlag a => a -> Int
fromFFlag KSPFlag
b
instance Ord KSPFlag where
compare :: KSPFlag -> KSPFlag -> Ordering
compare = (KSPFlag -> Int) -> KSPFlag -> KSPFlag -> Ordering
forall a b. Ord a => (b -> a) -> b -> b -> Ordering
comparing KSPFlag -> Int
forall a. FutureFlag a => a -> Int
fromFFlag
instance FutureFlag KSPFlag where
fromFFlag :: KSPFlag -> Int
fromFFlag KSPFlag
NoModify = Int
0
fromFFlag (KSPOther Int
i) = Int -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
i
toFFlag :: Int -> KSPFlag
toFFlag Int
0 = KSPFlag
NoModify
toFFlag Int
i = Int -> KSPFlag
KSPOther (Int -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
i)
instance Hashable KSPFlag
instance Pretty KSPFlag where
pretty :: forall ann. KSPFlag -> Doc ann
pretty KSPFlag
NoModify = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"no-modify"
pretty (KSPOther Int
o) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"unknown keyserver preference flag type" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Int -> Doc ann
forall ann. Int -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Int
o
$(ATH.deriveJSON ATH.defaultOptions ''KSPFlag)
data KeyFlag
= GroupKey
| AuthKey
| SplitKey
| EncryptStorageKey
| EncryptCommunicationsKey
| SignDataKey
| CertifyKeysKey
| KFOther Int
deriving (Typeable KeyFlag
Typeable KeyFlag =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KeyFlag -> c KeyFlag)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KeyFlag)
-> (KeyFlag -> Constr)
-> (KeyFlag -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KeyFlag))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KeyFlag))
-> ((forall b. Data b => b -> b) -> KeyFlag -> KeyFlag)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KeyFlag -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> KeyFlag -> r)
-> (forall u. (forall d. Data d => d -> u) -> KeyFlag -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> KeyFlag -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KeyFlag -> m KeyFlag)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyFlag -> m KeyFlag)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyFlag -> m KeyFlag)
-> Data KeyFlag
KeyFlag -> Constr
KeyFlag -> DataType
(forall b. Data b => b -> b) -> KeyFlag -> KeyFlag
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> KeyFlag -> u
forall u. (forall d. Data d => d -> u) -> KeyFlag -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KeyFlag -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> KeyFlag -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KeyFlag -> m KeyFlag
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyFlag -> m KeyFlag
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KeyFlag
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KeyFlag -> c KeyFlag
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KeyFlag)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KeyFlag)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KeyFlag -> c KeyFlag
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KeyFlag -> c KeyFlag
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KeyFlag
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KeyFlag
$ctoConstr :: KeyFlag -> Constr
toConstr :: KeyFlag -> Constr
$cdataTypeOf :: KeyFlag -> DataType
dataTypeOf :: KeyFlag -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KeyFlag)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KeyFlag)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KeyFlag)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KeyFlag)
$cgmapT :: (forall b. Data b => b -> b) -> KeyFlag -> KeyFlag
gmapT :: (forall b. Data b => b -> b) -> KeyFlag -> KeyFlag
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KeyFlag -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KeyFlag -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> KeyFlag -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> KeyFlag -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> KeyFlag -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> KeyFlag -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> KeyFlag -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> KeyFlag -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KeyFlag -> m KeyFlag
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KeyFlag -> m KeyFlag
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyFlag -> m KeyFlag
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyFlag -> m KeyFlag
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyFlag -> m KeyFlag
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyFlag -> m KeyFlag
Data, (forall x. KeyFlag -> Rep KeyFlag x)
-> (forall x. Rep KeyFlag x -> KeyFlag) -> Generic KeyFlag
forall x. Rep KeyFlag x -> KeyFlag
forall x. KeyFlag -> Rep KeyFlag x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. KeyFlag -> Rep KeyFlag x
from :: forall x. KeyFlag -> Rep KeyFlag x
$cto :: forall x. Rep KeyFlag x -> KeyFlag
to :: forall x. Rep KeyFlag x -> KeyFlag
Generic, Int -> KeyFlag -> ShowS
[KeyFlag] -> ShowS
KeyFlag -> String
(Int -> KeyFlag -> ShowS)
-> (KeyFlag -> String) -> ([KeyFlag] -> ShowS) -> Show KeyFlag
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> KeyFlag -> ShowS
showsPrec :: Int -> KeyFlag -> ShowS
$cshow :: KeyFlag -> String
show :: KeyFlag -> String
$cshowList :: [KeyFlag] -> ShowS
showList :: [KeyFlag] -> ShowS
Show, Typeable)
instance Eq KeyFlag where
== :: KeyFlag -> KeyFlag -> Bool
(==) KeyFlag
a KeyFlag
b = KeyFlag -> Int
forall a. FutureFlag a => a -> Int
fromFFlag KeyFlag
a Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== KeyFlag -> Int
forall a. FutureFlag a => a -> Int
fromFFlag KeyFlag
b
instance Ord KeyFlag where
compare :: KeyFlag -> KeyFlag -> Ordering
compare = (KeyFlag -> Int) -> KeyFlag -> KeyFlag -> Ordering
forall a b. Ord a => (b -> a) -> b -> b -> Ordering
comparing KeyFlag -> Int
forall a. FutureFlag a => a -> Int
fromFFlag
instance FutureFlag KeyFlag where
fromFFlag :: KeyFlag -> Int
fromFFlag KeyFlag
GroupKey = Int
0
fromFFlag KeyFlag
AuthKey = Int
2
fromFFlag KeyFlag
SplitKey = Int
3
fromFFlag KeyFlag
EncryptStorageKey = Int
4
fromFFlag KeyFlag
EncryptCommunicationsKey = Int
5
fromFFlag KeyFlag
SignDataKey = Int
6
fromFFlag KeyFlag
CertifyKeysKey = Int
7
fromFFlag (KFOther Int
i) = Int -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
i
toFFlag :: Int -> KeyFlag
toFFlag Int
0 = KeyFlag
GroupKey
toFFlag Int
2 = KeyFlag
AuthKey
toFFlag Int
3 = KeyFlag
SplitKey
toFFlag Int
4 = KeyFlag
EncryptStorageKey
toFFlag Int
5 = KeyFlag
EncryptCommunicationsKey
toFFlag Int
6 = KeyFlag
SignDataKey
toFFlag Int
7 = KeyFlag
CertifyKeysKey
toFFlag Int
i = Int -> KeyFlag
KFOther (Int -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
i)
instance Hashable KeyFlag
instance Pretty KeyFlag where
pretty :: forall ann. KeyFlag -> Doc ann
pretty KeyFlag
GroupKey = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"group"
pretty KeyFlag
AuthKey = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"auth"
pretty KeyFlag
SplitKey = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"split"
pretty KeyFlag
EncryptStorageKey = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"encrypt-storage"
pretty KeyFlag
EncryptCommunicationsKey = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"encrypt-communications"
pretty KeyFlag
SignDataKey = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"sign-data"
pretty KeyFlag
CertifyKeysKey = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"certify-keys"
pretty (KFOther Int
o) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"unknown key flag type" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Int -> Doc ann
forall ann. Int -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Int
o
$(ATH.deriveJSON ATH.defaultOptions ''KeyFlag)
data RevocationCode
= NoReason
| KeySuperseded
| KeyMaterialCompromised
| KeyRetiredAndNoLongerUsed
| UserIdInfoNoLongerValid
| RCoOther Word8
deriving (Typeable RevocationCode
Typeable RevocationCode =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RevocationCode -> c RevocationCode)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RevocationCode)
-> (RevocationCode -> Constr)
-> (RevocationCode -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RevocationCode))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RevocationCode))
-> ((forall b. Data b => b -> b)
-> RevocationCode -> RevocationCode)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationCode -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationCode -> r)
-> (forall u.
(forall d. Data d => d -> u) -> RevocationCode -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> RevocationCode -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RevocationCode -> m RevocationCode)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationCode -> m RevocationCode)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationCode -> m RevocationCode)
-> Data RevocationCode
RevocationCode -> Constr
RevocationCode -> DataType
(forall b. Data b => b -> b) -> RevocationCode -> RevocationCode
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> RevocationCode -> u
forall u. (forall d. Data d => d -> u) -> RevocationCode -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationCode -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationCode -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RevocationCode -> m RevocationCode
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationCode -> m RevocationCode
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RevocationCode
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RevocationCode -> c RevocationCode
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RevocationCode)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RevocationCode)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RevocationCode -> c RevocationCode
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RevocationCode -> c RevocationCode
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RevocationCode
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RevocationCode
$ctoConstr :: RevocationCode -> Constr
toConstr :: RevocationCode -> Constr
$cdataTypeOf :: RevocationCode -> DataType
dataTypeOf :: RevocationCode -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RevocationCode)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RevocationCode)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RevocationCode)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RevocationCode)
$cgmapT :: (forall b. Data b => b -> b) -> RevocationCode -> RevocationCode
gmapT :: (forall b. Data b => b -> b) -> RevocationCode -> RevocationCode
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationCode -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationCode -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationCode -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationCode -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> RevocationCode -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> RevocationCode -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> RevocationCode -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> RevocationCode -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RevocationCode -> m RevocationCode
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RevocationCode -> m RevocationCode
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationCode -> m RevocationCode
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationCode -> m RevocationCode
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationCode -> m RevocationCode
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RevocationCode -> m RevocationCode
Data, (forall x. RevocationCode -> Rep RevocationCode x)
-> (forall x. Rep RevocationCode x -> RevocationCode)
-> Generic RevocationCode
forall x. Rep RevocationCode x -> RevocationCode
forall x. RevocationCode -> Rep RevocationCode x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. RevocationCode -> Rep RevocationCode x
from :: forall x. RevocationCode -> Rep RevocationCode x
$cto :: forall x. Rep RevocationCode x -> RevocationCode
to :: forall x. Rep RevocationCode x -> RevocationCode
Generic, Int -> RevocationCode -> ShowS
[RevocationCode] -> ShowS
RevocationCode -> String
(Int -> RevocationCode -> ShowS)
-> (RevocationCode -> String)
-> ([RevocationCode] -> ShowS)
-> Show RevocationCode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RevocationCode -> ShowS
showsPrec :: Int -> RevocationCode -> ShowS
$cshow :: RevocationCode -> String
show :: RevocationCode -> String
$cshowList :: [RevocationCode] -> ShowS
showList :: [RevocationCode] -> ShowS
Show, Typeable)
instance Eq RevocationCode where
== :: RevocationCode -> RevocationCode -> Bool
(==) RevocationCode
a RevocationCode
b = RevocationCode -> Word8
forall a. FutureVal a => a -> Word8
fromFVal RevocationCode
a Word8 -> Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== RevocationCode -> Word8
forall a. FutureVal a => a -> Word8
fromFVal RevocationCode
b
instance Ord RevocationCode where
compare :: RevocationCode -> RevocationCode -> Ordering
compare = (RevocationCode -> Word8)
-> RevocationCode -> RevocationCode -> Ordering
forall a b. Ord a => (b -> a) -> b -> b -> Ordering
comparing RevocationCode -> Word8
forall a. FutureVal a => a -> Word8
fromFVal
instance FutureVal RevocationCode where
fromFVal :: RevocationCode -> Word8
fromFVal RevocationCode
NoReason = Word8
0
fromFVal RevocationCode
KeySuperseded = Word8
1
fromFVal RevocationCode
KeyMaterialCompromised = Word8
2
fromFVal RevocationCode
KeyRetiredAndNoLongerUsed = Word8
3
fromFVal RevocationCode
UserIdInfoNoLongerValid = Word8
32
fromFVal (RCoOther Word8
o) = Word8
o
toFVal :: Word8 -> RevocationCode
toFVal Word8
0 = RevocationCode
NoReason
toFVal Word8
1 = RevocationCode
KeySuperseded
toFVal Word8
2 = RevocationCode
KeyMaterialCompromised
toFVal Word8
3 = RevocationCode
KeyRetiredAndNoLongerUsed
toFVal Word8
32 = RevocationCode
UserIdInfoNoLongerValid
toFVal Word8
o = Word8 -> RevocationCode
RCoOther Word8
o
instance Hashable RevocationCode
instance Pretty RevocationCode where
pretty :: forall ann. RevocationCode -> Doc ann
pretty RevocationCode
NoReason = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"no reason"
pretty RevocationCode
KeySuperseded = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"key superseded"
pretty RevocationCode
KeyMaterialCompromised = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"key material compromised"
pretty RevocationCode
KeyRetiredAndNoLongerUsed = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"key retired and no longer used"
pretty RevocationCode
UserIdInfoNoLongerValid = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"user-ID info no longer valid"
pretty (RCoOther Word8
o) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"unknown revocation code" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
o
$(ATH.deriveJSON ATH.defaultOptions ''RevocationCode)
data FeatureFlag
= FeatureSEIPDv1
| FeatureSEIPDv2
| FeatureOther Int
deriving (Typeable FeatureFlag
Typeable FeatureFlag =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FeatureFlag -> c FeatureFlag)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FeatureFlag)
-> (FeatureFlag -> Constr)
-> (FeatureFlag -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c FeatureFlag))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c FeatureFlag))
-> ((forall b. Data b => b -> b) -> FeatureFlag -> FeatureFlag)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FeatureFlag -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> FeatureFlag -> r)
-> (forall u. (forall d. Data d => d -> u) -> FeatureFlag -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> FeatureFlag -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> FeatureFlag -> m FeatureFlag)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FeatureFlag -> m FeatureFlag)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FeatureFlag -> m FeatureFlag)
-> Data FeatureFlag
FeatureFlag -> Constr
FeatureFlag -> DataType
(forall b. Data b => b -> b) -> FeatureFlag -> FeatureFlag
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> FeatureFlag -> u
forall u. (forall d. Data d => d -> u) -> FeatureFlag -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FeatureFlag -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> FeatureFlag -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> FeatureFlag -> m FeatureFlag
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FeatureFlag -> m FeatureFlag
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FeatureFlag
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FeatureFlag -> c FeatureFlag
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c FeatureFlag)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c FeatureFlag)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FeatureFlag -> c FeatureFlag
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FeatureFlag -> c FeatureFlag
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FeatureFlag
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FeatureFlag
$ctoConstr :: FeatureFlag -> Constr
toConstr :: FeatureFlag -> Constr
$cdataTypeOf :: FeatureFlag -> DataType
dataTypeOf :: FeatureFlag -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c FeatureFlag)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c FeatureFlag)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c FeatureFlag)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c FeatureFlag)
$cgmapT :: (forall b. Data b => b -> b) -> FeatureFlag -> FeatureFlag
gmapT :: (forall b. Data b => b -> b) -> FeatureFlag -> FeatureFlag
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FeatureFlag -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FeatureFlag -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> FeatureFlag -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> FeatureFlag -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> FeatureFlag -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> FeatureFlag -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> FeatureFlag -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> FeatureFlag -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> FeatureFlag -> m FeatureFlag
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> FeatureFlag -> m FeatureFlag
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FeatureFlag -> m FeatureFlag
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FeatureFlag -> m FeatureFlag
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FeatureFlag -> m FeatureFlag
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FeatureFlag -> m FeatureFlag
Data, (forall x. FeatureFlag -> Rep FeatureFlag x)
-> (forall x. Rep FeatureFlag x -> FeatureFlag)
-> Generic FeatureFlag
forall x. Rep FeatureFlag x -> FeatureFlag
forall x. FeatureFlag -> Rep FeatureFlag x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. FeatureFlag -> Rep FeatureFlag x
from :: forall x. FeatureFlag -> Rep FeatureFlag x
$cto :: forall x. Rep FeatureFlag x -> FeatureFlag
to :: forall x. Rep FeatureFlag x -> FeatureFlag
Generic, Int -> FeatureFlag -> ShowS
[FeatureFlag] -> ShowS
FeatureFlag -> String
(Int -> FeatureFlag -> ShowS)
-> (FeatureFlag -> String)
-> ([FeatureFlag] -> ShowS)
-> Show FeatureFlag
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FeatureFlag -> ShowS
showsPrec :: Int -> FeatureFlag -> ShowS
$cshow :: FeatureFlag -> String
show :: FeatureFlag -> String
$cshowList :: [FeatureFlag] -> ShowS
showList :: [FeatureFlag] -> ShowS
Show, Typeable)
instance Eq FeatureFlag where
== :: FeatureFlag -> FeatureFlag -> Bool
(==) FeatureFlag
a FeatureFlag
b = FeatureFlag -> Int
forall a. FutureFlag a => a -> Int
fromFFlag FeatureFlag
a Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== FeatureFlag -> Int
forall a. FutureFlag a => a -> Int
fromFFlag FeatureFlag
b
instance Ord FeatureFlag where
compare :: FeatureFlag -> FeatureFlag -> Ordering
compare = (FeatureFlag -> Int) -> FeatureFlag -> FeatureFlag -> Ordering
forall a b. Ord a => (b -> a) -> b -> b -> Ordering
comparing FeatureFlag -> Int
forall a. FutureFlag a => a -> Int
fromFFlag
instance FutureFlag FeatureFlag where
fromFFlag :: FeatureFlag -> Int
fromFFlag FeatureFlag
FeatureSEIPDv1 = Int
7
fromFFlag FeatureFlag
FeatureSEIPDv2 = Int
4
fromFFlag (FeatureOther Int
i) = Int -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
i
toFFlag :: Int -> FeatureFlag
toFFlag Int
7 = FeatureFlag
FeatureSEIPDv1
toFFlag Int
4 = FeatureFlag
FeatureSEIPDv2
toFFlag Int
i = Int -> FeatureFlag
FeatureOther (Int -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
i)
instance Hashable FeatureFlag
instance Pretty FeatureFlag where
pretty :: forall ann. FeatureFlag -> Doc ann
pretty FeatureFlag
FeatureSEIPDv1 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"seipd-v1"
pretty FeatureFlag
FeatureSEIPDv2 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"seipd-v2"
pretty (FeatureOther Int
o) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"unknown feature flag type" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Int -> Doc ann
forall ann. Int -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Int
o
$(ATH.deriveJSON ATH.defaultOptions ''FeatureFlag)
newtype URL
= URL
{ URL -> URI
unURL :: URI
}
deriving (Typeable URL
Typeable URL =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> URL -> c URL)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c URL)
-> (URL -> Constr)
-> (URL -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c URL))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c URL))
-> ((forall b. Data b => b -> b) -> URL -> URL)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> URL -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> URL -> r)
-> (forall u. (forall d. Data d => d -> u) -> URL -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> URL -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> URL -> m URL)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> URL -> m URL)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> URL -> m URL)
-> Data URL
URL -> Constr
URL -> DataType
(forall b. Data b => b -> b) -> URL -> URL
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> URL -> u
forall u. (forall d. Data d => d -> u) -> URL -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> URL -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> URL -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> URL -> m URL
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> URL -> m URL
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c URL
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> URL -> c URL
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c URL)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c URL)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> URL -> c URL
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> URL -> c URL
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c URL
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c URL
$ctoConstr :: URL -> Constr
toConstr :: URL -> Constr
$cdataTypeOf :: URL -> DataType
dataTypeOf :: URL -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c URL)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c URL)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c URL)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c URL)
$cgmapT :: (forall b. Data b => b -> b) -> URL -> URL
gmapT :: (forall b. Data b => b -> b) -> URL -> URL
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> URL -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> URL -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> URL -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> URL -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> URL -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> URL -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> URL -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> URL -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> URL -> m URL
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> URL -> m URL
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> URL -> m URL
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> URL -> m URL
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> URL -> m URL
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> URL -> m URL
Data, URL -> URL -> Bool
(URL -> URL -> Bool) -> (URL -> URL -> Bool) -> Eq URL
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: URL -> URL -> Bool
== :: URL -> URL -> Bool
$c/= :: URL -> URL -> Bool
/= :: URL -> URL -> Bool
Eq, (forall x. URL -> Rep URL x)
-> (forall x. Rep URL x -> URL) -> Generic URL
forall x. Rep URL x -> URL
forall x. URL -> Rep URL x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. URL -> Rep URL x
from :: forall x. URL -> Rep URL x
$cto :: forall x. Rep URL x -> URL
to :: forall x. Rep URL x -> URL
Generic, Eq URL
Eq URL =>
(URL -> URL -> Ordering)
-> (URL -> URL -> Bool)
-> (URL -> URL -> Bool)
-> (URL -> URL -> Bool)
-> (URL -> URL -> Bool)
-> (URL -> URL -> URL)
-> (URL -> URL -> URL)
-> Ord URL
URL -> URL -> Bool
URL -> URL -> Ordering
URL -> URL -> URL
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: URL -> URL -> Ordering
compare :: URL -> URL -> Ordering
$c< :: URL -> URL -> Bool
< :: URL -> URL -> Bool
$c<= :: URL -> URL -> Bool
<= :: URL -> URL -> Bool
$c> :: URL -> URL -> Bool
> :: URL -> URL -> Bool
$c>= :: URL -> URL -> Bool
>= :: URL -> URL -> Bool
$cmax :: URL -> URL -> URL
max :: URL -> URL -> URL
$cmin :: URL -> URL -> URL
min :: URL -> URL -> URL
Ord, Int -> URL -> ShowS
[URL] -> ShowS
URL -> String
(Int -> URL -> ShowS)
-> (URL -> String) -> ([URL] -> ShowS) -> Show URL
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> URL -> ShowS
showsPrec :: Int -> URL -> ShowS
$cshow :: URL -> String
show :: URL -> String
$cshowList :: [URL] -> ShowS
showList :: [URL] -> ShowS
Show, Typeable)
instance Wrapped URL
instance Hashable URL where
hashWithSalt :: Int -> URL -> Int
hashWithSalt Int
salt (URL (URI String
s Maybe URIAuth
a String
p String
q String
f)) =
Int
salt
Int -> String -> Int
forall a. Hashable a => Int -> a -> Int
`hashWithSalt` String
s
Int -> String -> Int
forall a. Hashable a => Int -> a -> Int
`hashWithSalt` Maybe URIAuth -> String
forall a. Show a => a -> String
show Maybe URIAuth
a
Int -> String -> Int
forall a. Hashable a => Int -> a -> Int
`hashWithSalt` String
p
Int -> String -> Int
forall a. Hashable a => Int -> a -> Int
`hashWithSalt` String
q
Int -> String -> Int
forall a. Hashable a => Int -> a -> Int
`hashWithSalt` String
f
instance Pretty URL where
pretty :: forall ann. URL -> Doc ann
pretty = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (String -> Doc ann) -> (URL -> String) -> URL -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (\URI
uri -> ShowS -> URI -> ShowS
uriToString ShowS
forall a. a -> a
id URI
uri String
"") (URI -> String) -> (URL -> URI) -> URL -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped URL -> URL) -> URL -> Unwrapped URL
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op Unwrapped URL -> URL
URI -> URL
URL
instance A.ToJSON URL where
toJSON :: URL -> Value
toJSON URL
u =
[Pair] -> Value
object
[ String -> Key
AK.fromString String
"uri" Key -> String -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= (\URI
uri -> ShowS -> URI -> ShowS
uriToString ShowS
forall a. a -> a
id URI
uri String
"") ((Unwrapped URL -> URL) -> URL -> Unwrapped URL
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op Unwrapped URL -> URL
URI -> URL
URL URL
u)
]
instance A.FromJSON URL where
parseJSON :: Value -> Parser URL
parseJSON (A.Object Object
v) =
URI -> URL
URL (URI -> URL) -> (String -> URI) -> String -> URL
forall b c a. (b -> c) -> (a -> b) -> a -> c
. URI -> Maybe URI -> URI
forall a. a -> Maybe a -> a
fromMaybe URI
nullURI (Maybe URI -> URI) -> (String -> Maybe URI) -> String -> URI
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> Maybe URI
parseURI (String -> URL) -> Parser String -> Parser URL
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser String
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"uri"
parseJSON Value
_ = Parser URL
forall a. Parser a
forall (m :: * -> *) a. MonadPlus m => m a
mzero
data SigType
= BinarySig
| CanonicalTextSig
| StandaloneSig
| GenericCert
| PersonaCert
| CasualCert
| PositiveCert
| SubkeyBindingSig
| PrimaryKeyBindingSig
| DirectKeySignature
| KeyRevocationSig
| SubkeyRevocationSig
| CertRevocationSig
| TimestampSig
| ThirdPartyConfirmationSig
| OtherSig Word8
deriving (Typeable SigType
Typeable SigType =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SigType -> c SigType)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigType)
-> (SigType -> Constr)
-> (SigType -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SigType))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SigType))
-> ((forall b. Data b => b -> b) -> SigType -> SigType)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigType -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SigType -> r)
-> (forall u. (forall d. Data d => d -> u) -> SigType -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> SigType -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SigType -> m SigType)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SigType -> m SigType)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SigType -> m SigType)
-> Data SigType
SigType -> Constr
SigType -> DataType
(forall b. Data b => b -> b) -> SigType -> SigType
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> SigType -> u
forall u. (forall d. Data d => d -> u) -> SigType -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigType -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SigType -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SigType -> m SigType
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SigType -> m SigType
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigType
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SigType -> c SigType
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SigType)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SigType)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SigType -> c SigType
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SigType -> c SigType
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigType
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigType
$ctoConstr :: SigType -> Constr
toConstr :: SigType -> Constr
$cdataTypeOf :: SigType -> DataType
dataTypeOf :: SigType -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SigType)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SigType)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SigType)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SigType)
$cgmapT :: (forall b. Data b => b -> b) -> SigType -> SigType
gmapT :: (forall b. Data b => b -> b) -> SigType -> SigType
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigType -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigType -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SigType -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SigType -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SigType -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> SigType -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SigType -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SigType -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SigType -> m SigType
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SigType -> m SigType
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SigType -> m SigType
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SigType -> m SigType
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SigType -> m SigType
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SigType -> m SigType
Data, (forall x. SigType -> Rep SigType x)
-> (forall x. Rep SigType x -> SigType) -> Generic SigType
forall x. Rep SigType x -> SigType
forall x. SigType -> Rep SigType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SigType -> Rep SigType x
from :: forall x. SigType -> Rep SigType x
$cto :: forall x. Rep SigType x -> SigType
to :: forall x. Rep SigType x -> SigType
Generic, Int -> SigType -> ShowS
[SigType] -> ShowS
SigType -> String
(Int -> SigType -> ShowS)
-> (SigType -> String) -> ([SigType] -> ShowS) -> Show SigType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SigType -> ShowS
showsPrec :: Int -> SigType -> ShowS
$cshow :: SigType -> String
show :: SigType -> String
$cshowList :: [SigType] -> ShowS
showList :: [SigType] -> ShowS
Show, Typeable)
instance Eq SigType where
== :: SigType -> SigType -> Bool
(==) SigType
a SigType
b = SigType -> Word8
forall a. FutureVal a => a -> Word8
fromFVal SigType
a Word8 -> Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== SigType -> Word8
forall a. FutureVal a => a -> Word8
fromFVal SigType
b
instance Ord SigType where
compare :: SigType -> SigType -> Ordering
compare = (SigType -> Word8) -> SigType -> SigType -> Ordering
forall a b. Ord a => (b -> a) -> b -> b -> Ordering
comparing SigType -> Word8
forall a. FutureVal a => a -> Word8
fromFVal
instance FutureVal SigType where
fromFVal :: SigType -> Word8
fromFVal SigType
BinarySig = Word8
0x00
fromFVal SigType
CanonicalTextSig = Word8
0x01
fromFVal SigType
StandaloneSig = Word8
0x02
fromFVal SigType
GenericCert = Word8
0x10
fromFVal SigType
PersonaCert = Word8
0x11
fromFVal SigType
CasualCert = Word8
0x12
fromFVal SigType
PositiveCert = Word8
0x13
fromFVal SigType
SubkeyBindingSig = Word8
0x18
fromFVal SigType
PrimaryKeyBindingSig = Word8
0x19
fromFVal SigType
DirectKeySignature = Word8
0x1F
fromFVal SigType
KeyRevocationSig = Word8
0x20
fromFVal SigType
SubkeyRevocationSig = Word8
0x28
fromFVal SigType
CertRevocationSig = Word8
0x30
fromFVal SigType
TimestampSig = Word8
0x40
fromFVal SigType
ThirdPartyConfirmationSig = Word8
0x50
fromFVal (OtherSig Word8
o) = Word8
o
toFVal :: Word8 -> SigType
toFVal Word8
0x00 = SigType
BinarySig
toFVal Word8
0x01 = SigType
CanonicalTextSig
toFVal Word8
0x02 = SigType
StandaloneSig
toFVal Word8
0x10 = SigType
GenericCert
toFVal Word8
0x11 = SigType
PersonaCert
toFVal Word8
0x12 = SigType
CasualCert
toFVal Word8
0x13 = SigType
PositiveCert
toFVal Word8
0x18 = SigType
SubkeyBindingSig
toFVal Word8
0x19 = SigType
PrimaryKeyBindingSig
toFVal Word8
0x1F = SigType
DirectKeySignature
toFVal Word8
0x20 = SigType
KeyRevocationSig
toFVal Word8
0x28 = SigType
SubkeyRevocationSig
toFVal Word8
0x30 = SigType
CertRevocationSig
toFVal Word8
0x40 = SigType
TimestampSig
toFVal Word8
0x50 = SigType
ThirdPartyConfirmationSig
toFVal Word8
o = Word8 -> SigType
OtherSig Word8
o
instance Hashable SigType
instance Pretty SigType where
pretty :: forall ann. SigType -> Doc ann
pretty SigType
BinarySig = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"binary"
pretty SigType
CanonicalTextSig = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"canonical-pretty"
pretty SigType
StandaloneSig = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"standalone"
pretty SigType
GenericCert = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"generic"
pretty SigType
PersonaCert = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"persona"
pretty SigType
CasualCert = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"casual"
pretty SigType
PositiveCert = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"positive"
pretty SigType
SubkeyBindingSig = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"subkey-binding"
pretty SigType
PrimaryKeyBindingSig = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"primary-key-binding"
pretty SigType
DirectKeySignature = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"signature directly on a key"
pretty SigType
KeyRevocationSig = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"key-revocation"
pretty SigType
SubkeyRevocationSig = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"subkey-revocation"
pretty SigType
CertRevocationSig = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"cert-revocation"
pretty SigType
TimestampSig = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"timestamp"
pretty SigType
ThirdPartyConfirmationSig = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"third-party-confirmation"
pretty (OtherSig Word8
o) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"unknown signature type" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
o
$(ATH.deriveJSON ATH.defaultOptions ''SigType)
newtype MPI
= MPI
{ MPI -> Integer
unMPI :: Integer
}
deriving (Typeable MPI
Typeable MPI =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MPI -> c MPI)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MPI)
-> (MPI -> Constr)
-> (MPI -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MPI))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MPI))
-> ((forall b. Data b => b -> b) -> MPI -> MPI)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MPI -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MPI -> r)
-> (forall u. (forall d. Data d => d -> u) -> MPI -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> MPI -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> MPI -> m MPI)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MPI -> m MPI)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MPI -> m MPI)
-> Data MPI
MPI -> Constr
MPI -> DataType
(forall b. Data b => b -> b) -> MPI -> MPI
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> MPI -> u
forall u. (forall d. Data d => d -> u) -> MPI -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MPI -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MPI -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> MPI -> m MPI
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MPI -> m MPI
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MPI
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MPI -> c MPI
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MPI)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MPI)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MPI -> c MPI
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MPI -> c MPI
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MPI
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MPI
$ctoConstr :: MPI -> Constr
toConstr :: MPI -> Constr
$cdataTypeOf :: MPI -> DataType
dataTypeOf :: MPI -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MPI)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MPI)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MPI)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MPI)
$cgmapT :: (forall b. Data b => b -> b) -> MPI -> MPI
gmapT :: (forall b. Data b => b -> b) -> MPI -> MPI
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MPI -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MPI -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MPI -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MPI -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> MPI -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> MPI -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> MPI -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> MPI -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> MPI -> m MPI
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> MPI -> m MPI
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MPI -> m MPI
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MPI -> m MPI
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MPI -> m MPI
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MPI -> m MPI
Data, MPI -> MPI -> Bool
(MPI -> MPI -> Bool) -> (MPI -> MPI -> Bool) -> Eq MPI
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MPI -> MPI -> Bool
== :: MPI -> MPI -> Bool
$c/= :: MPI -> MPI -> Bool
/= :: MPI -> MPI -> Bool
Eq, (forall x. MPI -> Rep MPI x)
-> (forall x. Rep MPI x -> MPI) -> Generic MPI
forall x. Rep MPI x -> MPI
forall x. MPI -> Rep MPI x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. MPI -> Rep MPI x
from :: forall x. MPI -> Rep MPI x
$cto :: forall x. Rep MPI x -> MPI
to :: forall x. Rep MPI x -> MPI
Generic, Int -> MPI -> ShowS
[MPI] -> ShowS
MPI -> String
(Int -> MPI -> ShowS)
-> (MPI -> String) -> ([MPI] -> ShowS) -> Show MPI
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MPI -> ShowS
showsPrec :: Int -> MPI -> ShowS
$cshow :: MPI -> String
show :: MPI -> String
$cshowList :: [MPI] -> ShowS
showList :: [MPI] -> ShowS
Show, Typeable)
instance Wrapped MPI
instance Ord MPI where
compare :: MPI -> MPI -> Ordering
compare (MPI Integer
a) (MPI Integer
b) = Integer -> Integer -> Ordering
forall a. Ord a => a -> a -> Ordering
compare Integer
a Integer
b
instance Hashable MPI
instance Pretty MPI where
pretty :: forall ann. MPI -> Doc ann
pretty = Integer -> Doc ann
forall ann. Integer -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (Integer -> Doc ann) -> (MPI -> Integer) -> MPI -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped MPI -> MPI) -> MPI -> Unwrapped MPI
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op Integer -> MPI
Unwrapped MPI -> MPI
MPI
$(ATH.deriveJSON ATH.defaultOptions ''MPI)
newtype SignatureSalt
= SignatureSalt
{ SignatureSalt -> ByteString
unSignatureSalt :: B.ByteString
}
deriving
( Eq SignatureSalt
Ord SignatureSalt
Monoid SignatureSalt
ByteArrayAccess SignatureSalt
(Eq SignatureSalt, Ord SignatureSalt, Monoid SignatureSalt,
ByteArrayAccess SignatureSalt) =>
(forall p a. Int -> (Ptr p -> IO a) -> IO (a, SignatureSalt))
-> ByteArray SignatureSalt
forall ba.
(Eq ba, Ord ba, Monoid ba, ByteArrayAccess ba) =>
(forall p a. Int -> (Ptr p -> IO a) -> IO (a, ba)) -> ByteArray ba
forall p a. Int -> (Ptr p -> IO a) -> IO (a, SignatureSalt)
$callocRet :: forall p a. Int -> (Ptr p -> IO a) -> IO (a, SignatureSalt)
allocRet :: forall p a. Int -> (Ptr p -> IO a) -> IO (a, SignatureSalt)
ByteArray
, SignatureSalt -> Int
(SignatureSalt -> Int)
-> (forall p a. SignatureSalt -> (Ptr p -> IO a) -> IO a)
-> (forall p. SignatureSalt -> Ptr p -> IO ())
-> ByteArrayAccess SignatureSalt
forall p. SignatureSalt -> Ptr p -> IO ()
forall ba.
(ba -> Int)
-> (forall p a. ba -> (Ptr p -> IO a) -> IO a)
-> (forall p. ba -> Ptr p -> IO ())
-> ByteArrayAccess ba
forall p a. SignatureSalt -> (Ptr p -> IO a) -> IO a
$clength :: SignatureSalt -> Int
length :: SignatureSalt -> Int
$cwithByteArray :: forall p a. SignatureSalt -> (Ptr p -> IO a) -> IO a
withByteArray :: forall p a. SignatureSalt -> (Ptr p -> IO a) -> IO a
$ccopyByteArrayToPtr :: forall p. SignatureSalt -> Ptr p -> IO ()
copyByteArrayToPtr :: forall p. SignatureSalt -> Ptr p -> IO ()
ByteArrayAccess
, Typeable SignatureSalt
Typeable SignatureSalt =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SignatureSalt -> c SignatureSalt)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SignatureSalt)
-> (SignatureSalt -> Constr)
-> (SignatureSalt -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SignatureSalt))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SignatureSalt))
-> ((forall b. Data b => b -> b) -> SignatureSalt -> SignatureSalt)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SignatureSalt -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SignatureSalt -> r)
-> (forall u. (forall d. Data d => d -> u) -> SignatureSalt -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> SignatureSalt -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SignatureSalt -> m SignatureSalt)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SignatureSalt -> m SignatureSalt)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SignatureSalt -> m SignatureSalt)
-> Data SignatureSalt
SignatureSalt -> Constr
SignatureSalt -> DataType
(forall b. Data b => b -> b) -> SignatureSalt -> SignatureSalt
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> SignatureSalt -> u
forall u. (forall d. Data d => d -> u) -> SignatureSalt -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SignatureSalt -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SignatureSalt -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SignatureSalt -> m SignatureSalt
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SignatureSalt -> m SignatureSalt
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SignatureSalt
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SignatureSalt -> c SignatureSalt
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SignatureSalt)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SignatureSalt)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SignatureSalt -> c SignatureSalt
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SignatureSalt -> c SignatureSalt
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SignatureSalt
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SignatureSalt
$ctoConstr :: SignatureSalt -> Constr
toConstr :: SignatureSalt -> Constr
$cdataTypeOf :: SignatureSalt -> DataType
dataTypeOf :: SignatureSalt -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SignatureSalt)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SignatureSalt)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SignatureSalt)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SignatureSalt)
$cgmapT :: (forall b. Data b => b -> b) -> SignatureSalt -> SignatureSalt
gmapT :: (forall b. Data b => b -> b) -> SignatureSalt -> SignatureSalt
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SignatureSalt -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SignatureSalt -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SignatureSalt -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SignatureSalt -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SignatureSalt -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> SignatureSalt -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SignatureSalt -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SignatureSalt -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SignatureSalt -> m SignatureSalt
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SignatureSalt -> m SignatureSalt
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SignatureSalt -> m SignatureSalt
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SignatureSalt -> m SignatureSalt
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SignatureSalt -> m SignatureSalt
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SignatureSalt -> m SignatureSalt
Data
, SignatureSalt -> SignatureSalt -> Bool
(SignatureSalt -> SignatureSalt -> Bool)
-> (SignatureSalt -> SignatureSalt -> Bool) -> Eq SignatureSalt
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SignatureSalt -> SignatureSalt -> Bool
== :: SignatureSalt -> SignatureSalt -> Bool
$c/= :: SignatureSalt -> SignatureSalt -> Bool
/= :: SignatureSalt -> SignatureSalt -> Bool
Eq
, (forall x. SignatureSalt -> Rep SignatureSalt x)
-> (forall x. Rep SignatureSalt x -> SignatureSalt)
-> Generic SignatureSalt
forall x. Rep SignatureSalt x -> SignatureSalt
forall x. SignatureSalt -> Rep SignatureSalt x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SignatureSalt -> Rep SignatureSalt x
from :: forall x. SignatureSalt -> Rep SignatureSalt x
$cto :: forall x. Rep SignatureSalt x -> SignatureSalt
to :: forall x. Rep SignatureSalt x -> SignatureSalt
Generic
, Eq SignatureSalt
Eq SignatureSalt =>
(Int -> SignatureSalt -> Int)
-> (SignatureSalt -> Int) -> Hashable SignatureSalt
Int -> SignatureSalt -> Int
SignatureSalt -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> SignatureSalt -> Int
hashWithSalt :: Int -> SignatureSalt -> Int
$chash :: SignatureSalt -> Int
hash :: SignatureSalt -> Int
Hashable
, Semigroup SignatureSalt
SignatureSalt
Semigroup SignatureSalt =>
SignatureSalt
-> (SignatureSalt -> SignatureSalt -> SignatureSalt)
-> ([SignatureSalt] -> SignatureSalt)
-> Monoid SignatureSalt
[SignatureSalt] -> SignatureSalt
SignatureSalt -> SignatureSalt -> SignatureSalt
forall a.
Semigroup a =>
a -> (a -> a -> a) -> ([a] -> a) -> Monoid a
$cmempty :: SignatureSalt
mempty :: SignatureSalt
$cmappend :: SignatureSalt -> SignatureSalt -> SignatureSalt
mappend :: SignatureSalt -> SignatureSalt -> SignatureSalt
$cmconcat :: [SignatureSalt] -> SignatureSalt
mconcat :: [SignatureSalt] -> SignatureSalt
Monoid
, Eq SignatureSalt
Eq SignatureSalt =>
(SignatureSalt -> SignatureSalt -> Ordering)
-> (SignatureSalt -> SignatureSalt -> Bool)
-> (SignatureSalt -> SignatureSalt -> Bool)
-> (SignatureSalt -> SignatureSalt -> Bool)
-> (SignatureSalt -> SignatureSalt -> Bool)
-> (SignatureSalt -> SignatureSalt -> SignatureSalt)
-> (SignatureSalt -> SignatureSalt -> SignatureSalt)
-> Ord SignatureSalt
SignatureSalt -> SignatureSalt -> Bool
SignatureSalt -> SignatureSalt -> Ordering
SignatureSalt -> SignatureSalt -> SignatureSalt
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: SignatureSalt -> SignatureSalt -> Ordering
compare :: SignatureSalt -> SignatureSalt -> Ordering
$c< :: SignatureSalt -> SignatureSalt -> Bool
< :: SignatureSalt -> SignatureSalt -> Bool
$c<= :: SignatureSalt -> SignatureSalt -> Bool
<= :: SignatureSalt -> SignatureSalt -> Bool
$c> :: SignatureSalt -> SignatureSalt -> Bool
> :: SignatureSalt -> SignatureSalt -> Bool
$c>= :: SignatureSalt -> SignatureSalt -> Bool
>= :: SignatureSalt -> SignatureSalt -> Bool
$cmax :: SignatureSalt -> SignatureSalt -> SignatureSalt
max :: SignatureSalt -> SignatureSalt -> SignatureSalt
$cmin :: SignatureSalt -> SignatureSalt -> SignatureSalt
min :: SignatureSalt -> SignatureSalt -> SignatureSalt
Ord
, NonEmpty SignatureSalt -> SignatureSalt
SignatureSalt -> SignatureSalt -> SignatureSalt
(SignatureSalt -> SignatureSalt -> SignatureSalt)
-> (NonEmpty SignatureSalt -> SignatureSalt)
-> (forall b. Integral b => b -> SignatureSalt -> SignatureSalt)
-> Semigroup SignatureSalt
forall b. Integral b => b -> SignatureSalt -> SignatureSalt
forall a.
(a -> a -> a)
-> (NonEmpty a -> a)
-> (forall b. Integral b => b -> a -> a)
-> Semigroup a
$c<> :: SignatureSalt -> SignatureSalt -> SignatureSalt
<> :: SignatureSalt -> SignatureSalt -> SignatureSalt
$csconcat :: NonEmpty SignatureSalt -> SignatureSalt
sconcat :: NonEmpty SignatureSalt -> SignatureSalt
$cstimes :: forall b. Integral b => b -> SignatureSalt -> SignatureSalt
stimes :: forall b. Integral b => b -> SignatureSalt -> SignatureSalt
Semigroup
, Int -> SignatureSalt -> ShowS
[SignatureSalt] -> ShowS
SignatureSalt -> String
(Int -> SignatureSalt -> ShowS)
-> (SignatureSalt -> String)
-> ([SignatureSalt] -> ShowS)
-> Show SignatureSalt
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SignatureSalt -> ShowS
showsPrec :: Int -> SignatureSalt -> ShowS
$cshow :: SignatureSalt -> String
show :: SignatureSalt -> String
$cshowList :: [SignatureSalt] -> ShowS
showList :: [SignatureSalt] -> ShowS
Show
, Typeable
)
instance Pretty SignatureSalt where
pretty :: forall ann. SignatureSalt -> Doc ann
pretty (SignatureSalt ByteString
bs) = ByteString -> Doc ann
forall ann. ByteString -> Doc ann
prettyBS ByteString
bs
instance A.ToJSON SignatureSalt where
toJSON :: SignatureSalt -> Value
toJSON (SignatureSalt ByteString
bs) = [Word8] -> Value
forall a. ToJSON a => a -> Value
A.toJSON (ByteString -> [Word8]
B.unpack ByteString
bs)
data SignaturePayloadVersion
= SigPayloadV3
| SigPayloadV4
| SigPayloadV6
| SigPayloadVOther
deriving (Typeable SignaturePayloadVersion
Typeable SignaturePayloadVersion =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SignaturePayloadVersion
-> c SignaturePayloadVersion)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SignaturePayloadVersion)
-> (SignaturePayloadVersion -> Constr)
-> (SignaturePayloadVersion -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SignaturePayloadVersion))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SignaturePayloadVersion))
-> ((forall b. Data b => b -> b)
-> SignaturePayloadVersion -> SignaturePayloadVersion)
-> (forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> SignaturePayloadVersion
-> r)
-> (forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> SignaturePayloadVersion
-> r)
-> (forall u.
(forall d. Data d => d -> u) -> SignaturePayloadVersion -> [u])
-> (forall u.
Int
-> (forall d. Data d => d -> u) -> SignaturePayloadVersion -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SignaturePayloadVersion -> m SignaturePayloadVersion)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SignaturePayloadVersion -> m SignaturePayloadVersion)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SignaturePayloadVersion -> m SignaturePayloadVersion)
-> Data SignaturePayloadVersion
SignaturePayloadVersion -> Constr
SignaturePayloadVersion -> DataType
(forall b. Data b => b -> b)
-> SignaturePayloadVersion -> SignaturePayloadVersion
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> SignaturePayloadVersion -> u
forall u.
(forall d. Data d => d -> u) -> SignaturePayloadVersion -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> SignaturePayloadVersion
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> SignaturePayloadVersion
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SignaturePayloadVersion -> m SignaturePayloadVersion
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SignaturePayloadVersion -> m SignaturePayloadVersion
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SignaturePayloadVersion
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SignaturePayloadVersion
-> c SignaturePayloadVersion
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SignaturePayloadVersion)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SignaturePayloadVersion)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SignaturePayloadVersion
-> c SignaturePayloadVersion
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SignaturePayloadVersion
-> c SignaturePayloadVersion
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SignaturePayloadVersion
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SignaturePayloadVersion
$ctoConstr :: SignaturePayloadVersion -> Constr
toConstr :: SignaturePayloadVersion -> Constr
$cdataTypeOf :: SignaturePayloadVersion -> DataType
dataTypeOf :: SignaturePayloadVersion -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SignaturePayloadVersion)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SignaturePayloadVersion)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SignaturePayloadVersion)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SignaturePayloadVersion)
$cgmapT :: (forall b. Data b => b -> b)
-> SignaturePayloadVersion -> SignaturePayloadVersion
gmapT :: (forall b. Data b => b -> b)
-> SignaturePayloadVersion -> SignaturePayloadVersion
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> SignaturePayloadVersion
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> SignaturePayloadVersion
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> SignaturePayloadVersion
-> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> SignaturePayloadVersion
-> r
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> SignaturePayloadVersion -> [u]
gmapQ :: forall u.
(forall d. Data d => d -> u) -> SignaturePayloadVersion -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SignaturePayloadVersion -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SignaturePayloadVersion -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SignaturePayloadVersion -> m SignaturePayloadVersion
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SignaturePayloadVersion -> m SignaturePayloadVersion
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SignaturePayloadVersion -> m SignaturePayloadVersion
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SignaturePayloadVersion -> m SignaturePayloadVersion
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SignaturePayloadVersion -> m SignaturePayloadVersion
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SignaturePayloadVersion -> m SignaturePayloadVersion
Data, SignaturePayloadVersion -> SignaturePayloadVersion -> Bool
(SignaturePayloadVersion -> SignaturePayloadVersion -> Bool)
-> (SignaturePayloadVersion -> SignaturePayloadVersion -> Bool)
-> Eq SignaturePayloadVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SignaturePayloadVersion -> SignaturePayloadVersion -> Bool
== :: SignaturePayloadVersion -> SignaturePayloadVersion -> Bool
$c/= :: SignaturePayloadVersion -> SignaturePayloadVersion -> Bool
/= :: SignaturePayloadVersion -> SignaturePayloadVersion -> Bool
Eq, (forall x.
SignaturePayloadVersion -> Rep SignaturePayloadVersion x)
-> (forall x.
Rep SignaturePayloadVersion x -> SignaturePayloadVersion)
-> Generic SignaturePayloadVersion
forall x. Rep SignaturePayloadVersion x -> SignaturePayloadVersion
forall x. SignaturePayloadVersion -> Rep SignaturePayloadVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SignaturePayloadVersion -> Rep SignaturePayloadVersion x
from :: forall x. SignaturePayloadVersion -> Rep SignaturePayloadVersion x
$cto :: forall x. Rep SignaturePayloadVersion x -> SignaturePayloadVersion
to :: forall x. Rep SignaturePayloadVersion x -> SignaturePayloadVersion
Generic, Eq SignaturePayloadVersion
Eq SignaturePayloadVersion =>
(SignaturePayloadVersion -> SignaturePayloadVersion -> Ordering)
-> (SignaturePayloadVersion -> SignaturePayloadVersion -> Bool)
-> (SignaturePayloadVersion -> SignaturePayloadVersion -> Bool)
-> (SignaturePayloadVersion -> SignaturePayloadVersion -> Bool)
-> (SignaturePayloadVersion -> SignaturePayloadVersion -> Bool)
-> (SignaturePayloadVersion
-> SignaturePayloadVersion -> SignaturePayloadVersion)
-> (SignaturePayloadVersion
-> SignaturePayloadVersion -> SignaturePayloadVersion)
-> Ord SignaturePayloadVersion
SignaturePayloadVersion -> SignaturePayloadVersion -> Bool
SignaturePayloadVersion -> SignaturePayloadVersion -> Ordering
SignaturePayloadVersion
-> SignaturePayloadVersion -> SignaturePayloadVersion
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: SignaturePayloadVersion -> SignaturePayloadVersion -> Ordering
compare :: SignaturePayloadVersion -> SignaturePayloadVersion -> Ordering
$c< :: SignaturePayloadVersion -> SignaturePayloadVersion -> Bool
< :: SignaturePayloadVersion -> SignaturePayloadVersion -> Bool
$c<= :: SignaturePayloadVersion -> SignaturePayloadVersion -> Bool
<= :: SignaturePayloadVersion -> SignaturePayloadVersion -> Bool
$c> :: SignaturePayloadVersion -> SignaturePayloadVersion -> Bool
> :: SignaturePayloadVersion -> SignaturePayloadVersion -> Bool
$c>= :: SignaturePayloadVersion -> SignaturePayloadVersion -> Bool
>= :: SignaturePayloadVersion -> SignaturePayloadVersion -> Bool
$cmax :: SignaturePayloadVersion
-> SignaturePayloadVersion -> SignaturePayloadVersion
max :: SignaturePayloadVersion
-> SignaturePayloadVersion -> SignaturePayloadVersion
$cmin :: SignaturePayloadVersion
-> SignaturePayloadVersion -> SignaturePayloadVersion
min :: SignaturePayloadVersion
-> SignaturePayloadVersion -> SignaturePayloadVersion
Ord, Int -> SignaturePayloadVersion -> ShowS
[SignaturePayloadVersion] -> ShowS
SignaturePayloadVersion -> String
(Int -> SignaturePayloadVersion -> ShowS)
-> (SignaturePayloadVersion -> String)
-> ([SignaturePayloadVersion] -> ShowS)
-> Show SignaturePayloadVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SignaturePayloadVersion -> ShowS
showsPrec :: Int -> SignaturePayloadVersion -> ShowS
$cshow :: SignaturePayloadVersion -> String
show :: SignaturePayloadVersion -> String
$cshowList :: [SignaturePayloadVersion] -> ShowS
showList :: [SignaturePayloadVersion] -> ShowS
Show, Typeable)
instance Hashable SignaturePayloadVersion
data SignaturePayloadV (v :: SignaturePayloadVersion) where
SigPayloadV3Data
:: SigType
-> ThirtyTwoBitTimeStamp
-> EightOctetKeyId
-> PubKeyAlgorithm
-> HashAlgorithm
-> Word16
-> NonEmpty MPI
-> SignaturePayloadV 'SigPayloadV3
SigPayloadV4Data
:: SigType
-> PubKeyAlgorithm
-> HashAlgorithm
-> [SigSubPacket]
-> [SigSubPacket]
-> Word16
-> NonEmpty MPI
-> SignaturePayloadV 'SigPayloadV4
SigPayloadV6Data
:: SigType
-> PubKeyAlgorithm
-> HashAlgorithm
-> SignatureSalt
-> [SigSubPacket]
-> [SigSubPacket]
-> Word16
-> NonEmpty MPI
-> SignaturePayloadV 'SigPayloadV6
SigPayloadOtherData
:: Word8 -> ByteString -> SignaturePayloadV 'SigPayloadVOther
deriving instance Eq (SignaturePayloadV v)
deriving instance Show (SignaturePayloadV v)
data SomeSignaturePayload where
SomeSignaturePayload
:: SignaturePayloadV v -> SomeSignaturePayload
toSignaturePayload :: SignaturePayloadV v -> SignaturePayload
toSignaturePayload :: forall (v :: SignaturePayloadVersion).
SignaturePayloadV v -> SignaturePayload
toSignaturePayload (SigPayloadV3Data SigType
st ThirtyTwoBitTimeStamp
ts EightOctetKeyId
eoki PubKeyAlgorithm
pka HashAlgorithm
ha Word16
w16 NonEmpty MPI
mpis) =
SigType
-> ThirtyTwoBitTimeStamp
-> EightOctetKeyId
-> PubKeyAlgorithm
-> HashAlgorithm
-> Word16
-> NonEmpty MPI
-> SignaturePayload
SigV3 SigType
st ThirtyTwoBitTimeStamp
ts EightOctetKeyId
eoki PubKeyAlgorithm
pka HashAlgorithm
ha Word16
w16 NonEmpty MPI
mpis
toSignaturePayload (SigPayloadV4Data SigType
st PubKeyAlgorithm
pka HashAlgorithm
ha [SigSubPacket]
hsps [SigSubPacket]
usps Word16
w16 NonEmpty MPI
mpis) =
SigType
-> PubKeyAlgorithm
-> HashAlgorithm
-> [SigSubPacket]
-> [SigSubPacket]
-> Word16
-> NonEmpty MPI
-> SignaturePayload
SigV4 SigType
st PubKeyAlgorithm
pka HashAlgorithm
ha [SigSubPacket]
hsps [SigSubPacket]
usps Word16
w16 NonEmpty MPI
mpis
toSignaturePayload (SigPayloadV6Data SigType
st PubKeyAlgorithm
pka HashAlgorithm
ha SignatureSalt
salt [SigSubPacket]
hsps [SigSubPacket]
usps Word16
w16 NonEmpty MPI
mpis) =
SigType
-> PubKeyAlgorithm
-> HashAlgorithm
-> SignatureSalt
-> [SigSubPacket]
-> [SigSubPacket]
-> Word16
-> NonEmpty MPI
-> SignaturePayload
SigV6 SigType
st PubKeyAlgorithm
pka HashAlgorithm
ha SignatureSalt
salt [SigSubPacket]
hsps [SigSubPacket]
usps Word16
w16 NonEmpty MPI
mpis
toSignaturePayload (SigPayloadOtherData Word8
v ByteString
bs) = Word8 -> ByteString -> SignaturePayload
SigVOther Word8
v ByteString
bs
toSomeSignaturePayload
:: SignaturePayload -> SomeSignaturePayload
toSomeSignaturePayload :: SignaturePayload -> SomeSignaturePayload
toSomeSignaturePayload (SigV3 SigType
st ThirtyTwoBitTimeStamp
ts EightOctetKeyId
eoki PubKeyAlgorithm
pka HashAlgorithm
ha Word16
w16 NonEmpty MPI
mpis) =
SignaturePayloadV 'SigPayloadV3 -> SomeSignaturePayload
forall (v :: SignaturePayloadVersion).
SignaturePayloadV v -> SomeSignaturePayload
SomeSignaturePayload
(SigType
-> ThirtyTwoBitTimeStamp
-> EightOctetKeyId
-> PubKeyAlgorithm
-> HashAlgorithm
-> Word16
-> NonEmpty MPI
-> SignaturePayloadV 'SigPayloadV3
SigPayloadV3Data SigType
st ThirtyTwoBitTimeStamp
ts EightOctetKeyId
eoki PubKeyAlgorithm
pka HashAlgorithm
ha Word16
w16 NonEmpty MPI
mpis)
toSomeSignaturePayload (SigV4 SigType
st PubKeyAlgorithm
pka HashAlgorithm
ha [SigSubPacket]
hsps [SigSubPacket]
usps Word16
w16 NonEmpty MPI
mpis) =
SignaturePayloadV 'SigPayloadV4 -> SomeSignaturePayload
forall (v :: SignaturePayloadVersion).
SignaturePayloadV v -> SomeSignaturePayload
SomeSignaturePayload
(SigType
-> PubKeyAlgorithm
-> HashAlgorithm
-> [SigSubPacket]
-> [SigSubPacket]
-> Word16
-> NonEmpty MPI
-> SignaturePayloadV 'SigPayloadV4
SigPayloadV4Data SigType
st PubKeyAlgorithm
pka HashAlgorithm
ha [SigSubPacket]
hsps [SigSubPacket]
usps Word16
w16 NonEmpty MPI
mpis)
toSomeSignaturePayload (SigV6 SigType
st PubKeyAlgorithm
pka HashAlgorithm
ha SignatureSalt
salt [SigSubPacket]
hsps [SigSubPacket]
usps Word16
w16 NonEmpty MPI
mpis) =
SignaturePayloadV 'SigPayloadV6 -> SomeSignaturePayload
forall (v :: SignaturePayloadVersion).
SignaturePayloadV v -> SomeSignaturePayload
SomeSignaturePayload
(SigType
-> PubKeyAlgorithm
-> HashAlgorithm
-> SignatureSalt
-> [SigSubPacket]
-> [SigSubPacket]
-> Word16
-> NonEmpty MPI
-> SignaturePayloadV 'SigPayloadV6
SigPayloadV6Data SigType
st PubKeyAlgorithm
pka HashAlgorithm
ha SignatureSalt
salt [SigSubPacket]
hsps [SigSubPacket]
usps Word16
w16 NonEmpty MPI
mpis)
toSomeSignaturePayload (SigVOther Word8
v ByteString
bs) =
SignaturePayloadV 'SigPayloadVOther -> SomeSignaturePayload
forall (v :: SignaturePayloadVersion).
SignaturePayloadV v -> SomeSignaturePayload
SomeSignaturePayload (Word8 -> ByteString -> SignaturePayloadV 'SigPayloadVOther
SigPayloadOtherData Word8
v ByteString
bs)
signaturePayloadVersion
:: SignaturePayload -> SignaturePayloadVersion
signaturePayloadVersion :: SignaturePayload -> SignaturePayloadVersion
signaturePayloadVersion (SigV3 SigType
_ ThirtyTwoBitTimeStamp
_ EightOctetKeyId
_ PubKeyAlgorithm
_ HashAlgorithm
_ Word16
_ NonEmpty MPI
_) = SignaturePayloadVersion
SigPayloadV3
signaturePayloadVersion (SigV4 SigType
_ PubKeyAlgorithm
_ HashAlgorithm
_ [SigSubPacket]
_ [SigSubPacket]
_ Word16
_ NonEmpty MPI
_) = SignaturePayloadVersion
SigPayloadV4
signaturePayloadVersion (SigV6 SigType
_ PubKeyAlgorithm
_ HashAlgorithm
_ SignatureSalt
_ [SigSubPacket]
_ [SigSubPacket]
_ Word16
_ NonEmpty MPI
_) = SignaturePayloadVersion
SigPayloadV6
signaturePayloadVersion (SigVOther Word8
_ ByteString
_) = SignaturePayloadVersion
SigPayloadVOther
asSignaturePayloadV3
:: SignaturePayload
-> Either String (SignaturePayloadV 'SigPayloadV3)
asSignaturePayloadV3 :: SignaturePayload -> Either String (SignaturePayloadV 'SigPayloadV3)
asSignaturePayloadV3 (SigV3 SigType
st ThirtyTwoBitTimeStamp
ts EightOctetKeyId
eoki PubKeyAlgorithm
pka HashAlgorithm
ha Word16
w16 NonEmpty MPI
mpis) =
SignaturePayloadV 'SigPayloadV3
-> Either String (SignaturePayloadV 'SigPayloadV3)
forall a b. b -> Either a b
Right (SigType
-> ThirtyTwoBitTimeStamp
-> EightOctetKeyId
-> PubKeyAlgorithm
-> HashAlgorithm
-> Word16
-> NonEmpty MPI
-> SignaturePayloadV 'SigPayloadV3
SigPayloadV3Data SigType
st ThirtyTwoBitTimeStamp
ts EightOctetKeyId
eoki PubKeyAlgorithm
pka HashAlgorithm
ha Word16
w16 NonEmpty MPI
mpis)
asSignaturePayloadV3 SignaturePayload
_ =
String -> Either String (SignaturePayloadV 'SigPayloadV3)
forall a b. a -> Either a b
Left
String
"Cannot coerce non-v3 SignaturePayload to SignaturePayloadV3"
asSignaturePayloadV4
:: SignaturePayload
-> Either String (SignaturePayloadV 'SigPayloadV4)
asSignaturePayloadV4 :: SignaturePayload -> Either String (SignaturePayloadV 'SigPayloadV4)
asSignaturePayloadV4 (SigV4 SigType
st PubKeyAlgorithm
pka HashAlgorithm
ha [SigSubPacket]
hsps [SigSubPacket]
usps Word16
w16 NonEmpty MPI
mpis) =
SignaturePayloadV 'SigPayloadV4
-> Either String (SignaturePayloadV 'SigPayloadV4)
forall a b. b -> Either a b
Right (SigType
-> PubKeyAlgorithm
-> HashAlgorithm
-> [SigSubPacket]
-> [SigSubPacket]
-> Word16
-> NonEmpty MPI
-> SignaturePayloadV 'SigPayloadV4
SigPayloadV4Data SigType
st PubKeyAlgorithm
pka HashAlgorithm
ha [SigSubPacket]
hsps [SigSubPacket]
usps Word16
w16 NonEmpty MPI
mpis)
asSignaturePayloadV4 SignaturePayload
_ =
String -> Either String (SignaturePayloadV 'SigPayloadV4)
forall a b. a -> Either a b
Left
String
"Cannot coerce non-v4 SignaturePayload to SignaturePayloadV4"
asSignaturePayloadV6
:: SignaturePayload
-> Either String (SignaturePayloadV 'SigPayloadV6)
asSignaturePayloadV6 :: SignaturePayload -> Either String (SignaturePayloadV 'SigPayloadV6)
asSignaturePayloadV6 (SigV6 SigType
st PubKeyAlgorithm
pka HashAlgorithm
ha SignatureSalt
salt [SigSubPacket]
hsps [SigSubPacket]
usps Word16
w16 NonEmpty MPI
mpis) =
SignaturePayloadV 'SigPayloadV6
-> Either String (SignaturePayloadV 'SigPayloadV6)
forall a b. b -> Either a b
Right (SigType
-> PubKeyAlgorithm
-> HashAlgorithm
-> SignatureSalt
-> [SigSubPacket]
-> [SigSubPacket]
-> Word16
-> NonEmpty MPI
-> SignaturePayloadV 'SigPayloadV6
SigPayloadV6Data SigType
st PubKeyAlgorithm
pka HashAlgorithm
ha SignatureSalt
salt [SigSubPacket]
hsps [SigSubPacket]
usps Word16
w16 NonEmpty MPI
mpis)
asSignaturePayloadV6 SignaturePayload
_ =
String -> Either String (SignaturePayloadV 'SigPayloadV6)
forall a b. a -> Either a b
Left
String
"Cannot coerce non-v6 SignaturePayload to SignaturePayloadV6"
asSignaturePayloadOther
:: SignaturePayload
-> Either String (SignaturePayloadV 'SigPayloadVOther)
asSignaturePayloadOther :: SignaturePayload
-> Either String (SignaturePayloadV 'SigPayloadVOther)
asSignaturePayloadOther (SigVOther Word8
v ByteString
bs) = SignaturePayloadV 'SigPayloadVOther
-> Either String (SignaturePayloadV 'SigPayloadVOther)
forall a b. b -> Either a b
Right (Word8 -> ByteString -> SignaturePayloadV 'SigPayloadVOther
SigPayloadOtherData Word8
v ByteString
bs)
asSignaturePayloadOther SignaturePayload
_ =
String -> Either String (SignaturePayloadV 'SigPayloadVOther)
forall a b. a -> Either a b
Left
String
"Cannot coerce known-version SignaturePayload to SignaturePayloadVOther"
data SignaturePayload
= SigV3
SigType
ThirtyTwoBitTimeStamp
EightOctetKeyId
PubKeyAlgorithm
HashAlgorithm
Word16
(NonEmpty MPI)
| SigV4
SigType
PubKeyAlgorithm
HashAlgorithm
[SigSubPacket]
[SigSubPacket]
Word16
(NonEmpty MPI)
| SigV6
SigType
PubKeyAlgorithm
HashAlgorithm
SignatureSalt
[SigSubPacket]
[SigSubPacket]
Word16
(NonEmpty MPI)
| SigVOther Word8 ByteString
deriving (Typeable SignaturePayload
Typeable SignaturePayload =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SignaturePayload -> c SignaturePayload)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SignaturePayload)
-> (SignaturePayload -> Constr)
-> (SignaturePayload -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SignaturePayload))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SignaturePayload))
-> ((forall b. Data b => b -> b)
-> SignaturePayload -> SignaturePayload)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SignaturePayload -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SignaturePayload -> r)
-> (forall u.
(forall d. Data d => d -> u) -> SignaturePayload -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> SignaturePayload -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SignaturePayload -> m SignaturePayload)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SignaturePayload -> m SignaturePayload)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SignaturePayload -> m SignaturePayload)
-> Data SignaturePayload
SignaturePayload -> Constr
SignaturePayload -> DataType
(forall b. Data b => b -> b)
-> SignaturePayload -> SignaturePayload
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> SignaturePayload -> u
forall u. (forall d. Data d => d -> u) -> SignaturePayload -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SignaturePayload -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SignaturePayload -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SignaturePayload -> m SignaturePayload
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SignaturePayload -> m SignaturePayload
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SignaturePayload
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SignaturePayload -> c SignaturePayload
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SignaturePayload)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SignaturePayload)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SignaturePayload -> c SignaturePayload
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SignaturePayload -> c SignaturePayload
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SignaturePayload
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SignaturePayload
$ctoConstr :: SignaturePayload -> Constr
toConstr :: SignaturePayload -> Constr
$cdataTypeOf :: SignaturePayload -> DataType
dataTypeOf :: SignaturePayload -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SignaturePayload)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SignaturePayload)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SignaturePayload)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SignaturePayload)
$cgmapT :: (forall b. Data b => b -> b)
-> SignaturePayload -> SignaturePayload
gmapT :: (forall b. Data b => b -> b)
-> SignaturePayload -> SignaturePayload
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SignaturePayload -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SignaturePayload -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SignaturePayload -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SignaturePayload -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SignaturePayload -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> SignaturePayload -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SignaturePayload -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SignaturePayload -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SignaturePayload -> m SignaturePayload
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SignaturePayload -> m SignaturePayload
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SignaturePayload -> m SignaturePayload
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SignaturePayload -> m SignaturePayload
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SignaturePayload -> m SignaturePayload
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SignaturePayload -> m SignaturePayload
Data, SignaturePayload -> SignaturePayload -> Bool
(SignaturePayload -> SignaturePayload -> Bool)
-> (SignaturePayload -> SignaturePayload -> Bool)
-> Eq SignaturePayload
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SignaturePayload -> SignaturePayload -> Bool
== :: SignaturePayload -> SignaturePayload -> Bool
$c/= :: SignaturePayload -> SignaturePayload -> Bool
/= :: SignaturePayload -> SignaturePayload -> Bool
Eq, (forall x. SignaturePayload -> Rep SignaturePayload x)
-> (forall x. Rep SignaturePayload x -> SignaturePayload)
-> Generic SignaturePayload
forall x. Rep SignaturePayload x -> SignaturePayload
forall x. SignaturePayload -> Rep SignaturePayload x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SignaturePayload -> Rep SignaturePayload x
from :: forall x. SignaturePayload -> Rep SignaturePayload x
$cto :: forall x. Rep SignaturePayload x -> SignaturePayload
to :: forall x. Rep SignaturePayload x -> SignaturePayload
Generic, Int -> SignaturePayload -> ShowS
[SignaturePayload] -> ShowS
SignaturePayload -> String
(Int -> SignaturePayload -> ShowS)
-> (SignaturePayload -> String)
-> ([SignaturePayload] -> ShowS)
-> Show SignaturePayload
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SignaturePayload -> ShowS
showsPrec :: Int -> SignaturePayload -> ShowS
$cshow :: SignaturePayload -> String
show :: SignaturePayload -> String
$cshowList :: [SignaturePayload] -> ShowS
showList :: [SignaturePayload] -> ShowS
Show, Typeable)
instance Hashable SignaturePayload
instance Ord SignaturePayload where
compare :: SignaturePayload -> SignaturePayload -> Ordering
compare (SigV3 SigType
st1 ThirtyTwoBitTimeStamp
ts1 EightOctetKeyId
eoki1 PubKeyAlgorithm
pka1 HashAlgorithm
ha1 Word16
w161 NonEmpty MPI
mpis1) (SigV3 SigType
st2 ThirtyTwoBitTimeStamp
ts2 EightOctetKeyId
eoki2 PubKeyAlgorithm
pka2 HashAlgorithm
ha2 Word16
w162 NonEmpty MPI
mpis2) =
SigType -> SigType -> Ordering
forall a. Ord a => a -> a -> Ordering
compare SigType
st1 SigType
st2
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Ordering
forall a. Ord a => a -> a -> Ordering
compare ThirtyTwoBitTimeStamp
ts1 ThirtyTwoBitTimeStamp
ts2
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> EightOctetKeyId -> EightOctetKeyId -> Ordering
forall a. Ord a => a -> a -> Ordering
compare EightOctetKeyId
eoki1 EightOctetKeyId
eoki2
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> PubKeyAlgorithm -> PubKeyAlgorithm -> Ordering
forall a. Ord a => a -> a -> Ordering
compare PubKeyAlgorithm
pka1 PubKeyAlgorithm
pka2
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> HashAlgorithm -> HashAlgorithm -> Ordering
forall a. Ord a => a -> a -> Ordering
compare HashAlgorithm
ha1 HashAlgorithm
ha2
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> Word16 -> Word16 -> Ordering
forall a. Ord a => a -> a -> Ordering
compare Word16
w161 Word16
w162
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> [MPI] -> [MPI] -> Ordering
forall a. Ord a => a -> a -> Ordering
compare (NonEmpty MPI -> [MPI]
forall a. NonEmpty a -> [a]
NE.toList NonEmpty MPI
mpis1) (NonEmpty MPI -> [MPI]
forall a. NonEmpty a -> [a]
NE.toList NonEmpty MPI
mpis2)
compare (SigV4 SigType
st1 PubKeyAlgorithm
pka1 HashAlgorithm
ha1 [SigSubPacket]
hsp1 [SigSubPacket]
usp1 Word16
w161 NonEmpty MPI
mpis1) (SigV4 SigType
st2 PubKeyAlgorithm
pka2 HashAlgorithm
ha2 [SigSubPacket]
hsp2 [SigSubPacket]
usp2 Word16
w162 NonEmpty MPI
mpis2) =
SigType -> SigType -> Ordering
forall a. Ord a => a -> a -> Ordering
compare SigType
st1 SigType
st2
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> PubKeyAlgorithm -> PubKeyAlgorithm -> Ordering
forall a. Ord a => a -> a -> Ordering
compare PubKeyAlgorithm
pka1 PubKeyAlgorithm
pka2
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> HashAlgorithm -> HashAlgorithm -> Ordering
forall a. Ord a => a -> a -> Ordering
compare HashAlgorithm
ha1 HashAlgorithm
ha2
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> [SigSubPacket] -> [SigSubPacket] -> Ordering
forall a. Ord a => a -> a -> Ordering
compare [SigSubPacket]
hsp1 [SigSubPacket]
hsp2
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> [SigSubPacket] -> [SigSubPacket] -> Ordering
forall a. Ord a => a -> a -> Ordering
compare [SigSubPacket]
usp1 [SigSubPacket]
usp2
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> Word16 -> Word16 -> Ordering
forall a. Ord a => a -> a -> Ordering
compare Word16
w161 Word16
w162
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> [MPI] -> [MPI] -> Ordering
forall a. Ord a => a -> a -> Ordering
compare (NonEmpty MPI -> [MPI]
forall a. NonEmpty a -> [a]
NE.toList NonEmpty MPI
mpis1) (NonEmpty MPI -> [MPI]
forall a. NonEmpty a -> [a]
NE.toList NonEmpty MPI
mpis2)
compare (SigV6 SigType
st1 PubKeyAlgorithm
pka1 HashAlgorithm
ha1 SignatureSalt
salt1 [SigSubPacket]
hsp1 [SigSubPacket]
usp1 Word16
w161 NonEmpty MPI
mpis1) (SigV6 SigType
st2 PubKeyAlgorithm
pka2 HashAlgorithm
ha2 SignatureSalt
salt2 [SigSubPacket]
hsp2 [SigSubPacket]
usp2 Word16
w162 NonEmpty MPI
mpis2) =
SigType -> SigType -> Ordering
forall a. Ord a => a -> a -> Ordering
compare SigType
st1 SigType
st2
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> PubKeyAlgorithm -> PubKeyAlgorithm -> Ordering
forall a. Ord a => a -> a -> Ordering
compare PubKeyAlgorithm
pka1 PubKeyAlgorithm
pka2
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> HashAlgorithm -> HashAlgorithm -> Ordering
forall a. Ord a => a -> a -> Ordering
compare HashAlgorithm
ha1 HashAlgorithm
ha2
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> SignatureSalt -> SignatureSalt -> Ordering
forall a. Ord a => a -> a -> Ordering
compare SignatureSalt
salt1 SignatureSalt
salt2
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> [SigSubPacket] -> [SigSubPacket] -> Ordering
forall a. Ord a => a -> a -> Ordering
compare [SigSubPacket]
hsp1 [SigSubPacket]
hsp2
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> [SigSubPacket] -> [SigSubPacket] -> Ordering
forall a. Ord a => a -> a -> Ordering
compare [SigSubPacket]
usp1 [SigSubPacket]
usp2
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> Word16 -> Word16 -> Ordering
forall a. Ord a => a -> a -> Ordering
compare Word16
w161 Word16
w162
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> [MPI] -> [MPI] -> Ordering
forall a. Ord a => a -> a -> Ordering
compare (NonEmpty MPI -> [MPI]
forall a. NonEmpty a -> [a]
NE.toList NonEmpty MPI
mpis1) (NonEmpty MPI -> [MPI]
forall a. NonEmpty a -> [a]
NE.toList NonEmpty MPI
mpis2)
compare (SigVOther Word8
t1 ByteString
bs1) (SigVOther Word8
t2 ByteString
bs2) =
Word8 -> Word8 -> Ordering
forall a. Ord a => a -> a -> Ordering
compare Word8
t1 Word8
t2 Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> ByteString -> ByteString -> Ordering
forall a. Ord a => a -> a -> Ordering
compare ByteString
bs1 ByteString
bs2
compare SigV3 {} SigV4 {} = Ordering
LT
compare SigV3 {} SigV6 {} = Ordering
LT
compare SigV3 {} SigVOther {} = Ordering
LT
compare SigV4 {} SigV3 {} = Ordering
GT
compare SigV4 {} SigV6 {} = Ordering
LT
compare SigV4 {} SigVOther {} = Ordering
LT
compare SigV6 {} SigV3 {} = Ordering
GT
compare SigV6 {} SigV4 {} = Ordering
GT
compare SigV6 {} SigVOther {} = Ordering
LT
compare SigVOther {} SigV3 {} = Ordering
GT
compare SigVOther {} SigV4 {} = Ordering
GT
compare SigVOther {} SigV6 {} = Ordering
GT
instance Pretty SignaturePayload where
pretty :: forall ann. SignaturePayload -> Doc ann
pretty (SigV3 SigType
st ThirtyTwoBitTimeStamp
ts EightOctetKeyId
eoki PubKeyAlgorithm
pka HashAlgorithm
ha Word16
w16 NonEmpty MPI
mpis) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"signature v3"
Doc ann -> Doc ann -> Doc ann
forall a. Semigroup a => a -> a -> a
<> Char -> Doc ann
forall ann. Char -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Char
':'
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> SigType -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. SigType -> Doc ann
pretty SigType
st
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> ThirtyTwoBitTimeStamp -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. ThirtyTwoBitTimeStamp -> Doc ann
pretty ThirtyTwoBitTimeStamp
ts
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> EightOctetKeyId -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. EightOctetKeyId -> Doc ann
pretty EightOctetKeyId
eoki
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> PubKeyAlgorithm -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. PubKeyAlgorithm -> Doc ann
pretty PubKeyAlgorithm
pka
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> HashAlgorithm -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. HashAlgorithm -> Doc ann
pretty HashAlgorithm
ha
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word16 -> Doc ann
forall ann. Word16 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word16
w16
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> ([MPI] -> Doc ann
forall ann. [MPI] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty ([MPI] -> Doc ann)
-> (NonEmpty MPI -> [MPI]) -> NonEmpty MPI -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NonEmpty MPI -> [MPI]
forall a. NonEmpty a -> [a]
NE.toList) NonEmpty MPI
mpis
pretty (SigV4 SigType
st PubKeyAlgorithm
pka HashAlgorithm
ha [SigSubPacket]
hsps [SigSubPacket]
usps Word16
w16 NonEmpty MPI
mpis) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"signature v4"
Doc ann -> Doc ann -> Doc ann
forall a. Semigroup a => a -> a -> a
<> Char -> Doc ann
forall ann. Char -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Char
':'
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> SigType -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. SigType -> Doc ann
pretty SigType
st
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> PubKeyAlgorithm -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. PubKeyAlgorithm -> Doc ann
pretty PubKeyAlgorithm
pka
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> HashAlgorithm -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. HashAlgorithm -> Doc ann
pretty HashAlgorithm
ha
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> [SigSubPacket] -> Doc ann
forall ann. [SigSubPacket] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty [SigSubPacket]
hsps
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> [SigSubPacket] -> Doc ann
forall ann. [SigSubPacket] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty [SigSubPacket]
usps
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word16 -> Doc ann
forall ann. Word16 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word16
w16
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> ([MPI] -> Doc ann
forall ann. [MPI] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty ([MPI] -> Doc ann)
-> (NonEmpty MPI -> [MPI]) -> NonEmpty MPI -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NonEmpty MPI -> [MPI]
forall a. NonEmpty a -> [a]
NE.toList) NonEmpty MPI
mpis
pretty (SigV6 SigType
st PubKeyAlgorithm
pka HashAlgorithm
ha SignatureSalt
salt [SigSubPacket]
hsps [SigSubPacket]
usps Word16
w16 NonEmpty MPI
mpis) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"signature v6"
Doc ann -> Doc ann -> Doc ann
forall a. Semigroup a => a -> a -> a
<> Char -> Doc ann
forall ann. Char -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Char
':'
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> SigType -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. SigType -> Doc ann
pretty SigType
st
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> PubKeyAlgorithm -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. PubKeyAlgorithm -> Doc ann
pretty PubKeyAlgorithm
pka
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> HashAlgorithm -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. HashAlgorithm -> Doc ann
pretty HashAlgorithm
ha
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> SignatureSalt -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. SignatureSalt -> Doc ann
pretty SignatureSalt
salt
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> [SigSubPacket] -> Doc ann
forall ann. [SigSubPacket] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty [SigSubPacket]
hsps
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> [SigSubPacket] -> Doc ann
forall ann. [SigSubPacket] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty [SigSubPacket]
usps
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word16 -> Doc ann
forall ann. Word16 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word16
w16
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> ([MPI] -> Doc ann
forall ann. [MPI] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty ([MPI] -> Doc ann)
-> (NonEmpty MPI -> [MPI]) -> NonEmpty MPI -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NonEmpty MPI -> [MPI]
forall a. NonEmpty a -> [a]
NE.toList) NonEmpty MPI
mpis
pretty (SigVOther Word8
t ByteString
bs) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"unknown signature v"
Doc ann -> Doc ann -> Doc ann
forall a. Semigroup a => a -> a -> a
<> Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
t
Doc ann -> Doc ann -> Doc ann
forall a. Semigroup a => a -> a -> a
<> Char -> Doc ann
forall ann. Char -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Char
':'
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> [Word8] -> Doc ann
forall ann. [Word8] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (ByteString -> [Word8]
BL.unpack ByteString
bs)
instance A.ToJSON SignaturePayload where
toJSON :: SignaturePayload -> Value
toJSON (SigV3 SigType
st ThirtyTwoBitTimeStamp
ts EightOctetKeyId
eoki PubKeyAlgorithm
pka HashAlgorithm
ha Word16
w16 NonEmpty MPI
mpis) =
(SigType, ThirtyTwoBitTimeStamp, EightOctetKeyId, PubKeyAlgorithm,
HashAlgorithm, Word16, [MPI])
-> Value
forall a. ToJSON a => a -> Value
A.toJSON (SigType
st, ThirtyTwoBitTimeStamp
ts, EightOctetKeyId
eoki, PubKeyAlgorithm
pka, HashAlgorithm
ha, Word16
w16, NonEmpty MPI -> [MPI]
forall a. NonEmpty a -> [a]
NE.toList NonEmpty MPI
mpis)
toJSON (SigV4 SigType
st PubKeyAlgorithm
pka HashAlgorithm
ha [SigSubPacket]
hsps [SigSubPacket]
usps Word16
w16 NonEmpty MPI
mpis) =
(SigType, PubKeyAlgorithm, HashAlgorithm, [SigSubPacket],
[SigSubPacket], Word16, [MPI])
-> Value
forall a. ToJSON a => a -> Value
A.toJSON (SigType
st, PubKeyAlgorithm
pka, HashAlgorithm
ha, [SigSubPacket]
hsps, [SigSubPacket]
usps, Word16
w16, NonEmpty MPI -> [MPI]
forall a. NonEmpty a -> [a]
NE.toList NonEmpty MPI
mpis)
toJSON (SigV6 SigType
st PubKeyAlgorithm
pka HashAlgorithm
ha SignatureSalt
salt [SigSubPacket]
hsps [SigSubPacket]
usps Word16
w16 NonEmpty MPI
mpis) =
(SigType, PubKeyAlgorithm, HashAlgorithm, SignatureSalt,
[SigSubPacket], [SigSubPacket], Word16, [MPI])
-> Value
forall a. ToJSON a => a -> Value
A.toJSON (SigType
st, PubKeyAlgorithm
pka, HashAlgorithm
ha, SignatureSalt
salt, [SigSubPacket]
hsps, [SigSubPacket]
usps, Word16
w16, NonEmpty MPI -> [MPI]
forall a. NonEmpty a -> [a]
NE.toList NonEmpty MPI
mpis)
toJSON (SigVOther Word8
t ByteString
bs) = (Word8, [Word8]) -> Value
forall a. ToJSON a => a -> Value
A.toJSON (Word8
t, ByteString -> [Word8]
BL.unpack ByteString
bs)
data IssuerFingerprintVersion
= IssuerFingerprintV4
| IssuerFingerprintV6
deriving (Typeable IssuerFingerprintVersion
Typeable IssuerFingerprintVersion =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> IssuerFingerprintVersion
-> c IssuerFingerprintVersion)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IssuerFingerprintVersion)
-> (IssuerFingerprintVersion -> Constr)
-> (IssuerFingerprintVersion -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c IssuerFingerprintVersion))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IssuerFingerprintVersion))
-> ((forall b. Data b => b -> b)
-> IssuerFingerprintVersion -> IssuerFingerprintVersion)
-> (forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> IssuerFingerprintVersion
-> r)
-> (forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> IssuerFingerprintVersion
-> r)
-> (forall u.
(forall d. Data d => d -> u) -> IssuerFingerprintVersion -> [u])
-> (forall u.
Int
-> (forall d. Data d => d -> u) -> IssuerFingerprintVersion -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IssuerFingerprintVersion -> m IssuerFingerprintVersion)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssuerFingerprintVersion -> m IssuerFingerprintVersion)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssuerFingerprintVersion -> m IssuerFingerprintVersion)
-> Data IssuerFingerprintVersion
IssuerFingerprintVersion -> Constr
IssuerFingerprintVersion -> DataType
(forall b. Data b => b -> b)
-> IssuerFingerprintVersion -> IssuerFingerprintVersion
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int
-> (forall d. Data d => d -> u) -> IssuerFingerprintVersion -> u
forall u.
(forall d. Data d => d -> u) -> IssuerFingerprintVersion -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> IssuerFingerprintVersion
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> IssuerFingerprintVersion
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IssuerFingerprintVersion -> m IssuerFingerprintVersion
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssuerFingerprintVersion -> m IssuerFingerprintVersion
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IssuerFingerprintVersion
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> IssuerFingerprintVersion
-> c IssuerFingerprintVersion
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IssuerFingerprintVersion)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IssuerFingerprintVersion)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> IssuerFingerprintVersion
-> c IssuerFingerprintVersion
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> IssuerFingerprintVersion
-> c IssuerFingerprintVersion
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IssuerFingerprintVersion
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IssuerFingerprintVersion
$ctoConstr :: IssuerFingerprintVersion -> Constr
toConstr :: IssuerFingerprintVersion -> Constr
$cdataTypeOf :: IssuerFingerprintVersion -> DataType
dataTypeOf :: IssuerFingerprintVersion -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IssuerFingerprintVersion)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IssuerFingerprintVersion)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IssuerFingerprintVersion)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IssuerFingerprintVersion)
$cgmapT :: (forall b. Data b => b -> b)
-> IssuerFingerprintVersion -> IssuerFingerprintVersion
gmapT :: (forall b. Data b => b -> b)
-> IssuerFingerprintVersion -> IssuerFingerprintVersion
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> IssuerFingerprintVersion
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> IssuerFingerprintVersion
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> IssuerFingerprintVersion
-> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> IssuerFingerprintVersion
-> r
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> IssuerFingerprintVersion -> [u]
gmapQ :: forall u.
(forall d. Data d => d -> u) -> IssuerFingerprintVersion -> [u]
$cgmapQi :: forall u.
Int
-> (forall d. Data d => d -> u) -> IssuerFingerprintVersion -> u
gmapQi :: forall u.
Int
-> (forall d. Data d => d -> u) -> IssuerFingerprintVersion -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IssuerFingerprintVersion -> m IssuerFingerprintVersion
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IssuerFingerprintVersion -> m IssuerFingerprintVersion
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssuerFingerprintVersion -> m IssuerFingerprintVersion
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssuerFingerprintVersion -> m IssuerFingerprintVersion
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssuerFingerprintVersion -> m IssuerFingerprintVersion
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssuerFingerprintVersion -> m IssuerFingerprintVersion
Data, IssuerFingerprintVersion -> IssuerFingerprintVersion -> Bool
(IssuerFingerprintVersion -> IssuerFingerprintVersion -> Bool)
-> (IssuerFingerprintVersion -> IssuerFingerprintVersion -> Bool)
-> Eq IssuerFingerprintVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IssuerFingerprintVersion -> IssuerFingerprintVersion -> Bool
== :: IssuerFingerprintVersion -> IssuerFingerprintVersion -> Bool
$c/= :: IssuerFingerprintVersion -> IssuerFingerprintVersion -> Bool
/= :: IssuerFingerprintVersion -> IssuerFingerprintVersion -> Bool
Eq, (forall x.
IssuerFingerprintVersion -> Rep IssuerFingerprintVersion x)
-> (forall x.
Rep IssuerFingerprintVersion x -> IssuerFingerprintVersion)
-> Generic IssuerFingerprintVersion
forall x.
Rep IssuerFingerprintVersion x -> IssuerFingerprintVersion
forall x.
IssuerFingerprintVersion -> Rep IssuerFingerprintVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
IssuerFingerprintVersion -> Rep IssuerFingerprintVersion x
from :: forall x.
IssuerFingerprintVersion -> Rep IssuerFingerprintVersion x
$cto :: forall x.
Rep IssuerFingerprintVersion x -> IssuerFingerprintVersion
to :: forall x.
Rep IssuerFingerprintVersion x -> IssuerFingerprintVersion
Generic, Int -> IssuerFingerprintVersion -> ShowS
[IssuerFingerprintVersion] -> ShowS
IssuerFingerprintVersion -> String
(Int -> IssuerFingerprintVersion -> ShowS)
-> (IssuerFingerprintVersion -> String)
-> ([IssuerFingerprintVersion] -> ShowS)
-> Show IssuerFingerprintVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IssuerFingerprintVersion -> ShowS
showsPrec :: Int -> IssuerFingerprintVersion -> ShowS
$cshow :: IssuerFingerprintVersion -> String
show :: IssuerFingerprintVersion -> String
$cshowList :: [IssuerFingerprintVersion] -> ShowS
showList :: [IssuerFingerprintVersion] -> ShowS
Show, Typeable)
instance Ord IssuerFingerprintVersion where
IssuerFingerprintVersion
IssuerFingerprintV4 compare :: IssuerFingerprintVersion -> IssuerFingerprintVersion -> Ordering
`compare` IssuerFingerprintVersion
IssuerFingerprintV4 = Ordering
EQ
IssuerFingerprintVersion
IssuerFingerprintV4 `compare` IssuerFingerprintVersion
IssuerFingerprintV6 = Ordering
LT
IssuerFingerprintVersion
IssuerFingerprintV6 `compare` IssuerFingerprintVersion
IssuerFingerprintV4 = Ordering
GT
IssuerFingerprintVersion
IssuerFingerprintV6 `compare` IssuerFingerprintVersion
IssuerFingerprintV6 = Ordering
EQ
instance Hashable IssuerFingerprintVersion
instance Pretty IssuerFingerprintVersion where
pretty :: forall ann. IssuerFingerprintVersion -> Doc ann
pretty IssuerFingerprintVersion
IssuerFingerprintV4 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"4"
pretty IssuerFingerprintVersion
IssuerFingerprintV6 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"6"
instance A.ToJSON IssuerFingerprintVersion where
toJSON :: IssuerFingerprintVersion -> Value
toJSON IssuerFingerprintVersion
IssuerFingerprintV4 = Word8 -> Value
forall a. ToJSON a => a -> Value
A.toJSON (Word8
4 :: Word8)
toJSON IssuerFingerprintVersion
IssuerFingerprintV6 = Word8 -> Value
forall a. ToJSON a => a -> Value
A.toJSON (Word8
6 :: Word8)
instance A.FromJSON IssuerFingerprintVersion where
parseJSON :: Value -> Parser IssuerFingerprintVersion
parseJSON (A.Number Scientific
n) =
case Scientific -> Integer
forall b. Integral b => Scientific -> b
forall a b. (RealFrac a, Integral b) => a -> b
round Scientific
n :: Integer of
Integer
4 -> IssuerFingerprintVersion -> Parser IssuerFingerprintVersion
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure IssuerFingerprintVersion
IssuerFingerprintV4
Integer
6 -> IssuerFingerprintVersion -> Parser IssuerFingerprintVersion
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure IssuerFingerprintVersion
IssuerFingerprintV6
Integer
_ -> Parser IssuerFingerprintVersion
forall a. Parser a
forall (m :: * -> *) a. MonadPlus m => m a
mzero
parseJSON Value
_ = Parser IssuerFingerprintVersion
forall a. Parser a
forall (m :: * -> *) a. MonadPlus m => m a
mzero
issuerFingerprintVersionToPacketVersion
:: IssuerFingerprintVersion -> PacketVersion
issuerFingerprintVersionToPacketVersion :: IssuerFingerprintVersion -> Word8
issuerFingerprintVersionToPacketVersion IssuerFingerprintVersion
IssuerFingerprintV4 = Word8
4
issuerFingerprintVersionToPacketVersion IssuerFingerprintVersion
IssuerFingerprintV6 = Word8
6
packetVersionToIssuerFingerprintVersion
:: PacketVersion -> Maybe IssuerFingerprintVersion
packetVersionToIssuerFingerprintVersion :: Word8 -> Maybe IssuerFingerprintVersion
packetVersionToIssuerFingerprintVersion Word8
4 = IssuerFingerprintVersion -> Maybe IssuerFingerprintVersion
forall a. a -> Maybe a
Just IssuerFingerprintVersion
IssuerFingerprintV4
packetVersionToIssuerFingerprintVersion Word8
6 = IssuerFingerprintVersion -> Maybe IssuerFingerprintVersion
forall a. a -> Maybe a
Just IssuerFingerprintVersion
IssuerFingerprintV6
packetVersionToIssuerFingerprintVersion Word8
_ = Maybe IssuerFingerprintVersion
forall a. Maybe a
Nothing
data SigSubPacketPayload
= SigCreationTime ThirtyTwoBitTimeStamp
| SigExpirationTime ThirtyTwoBitDuration
| ExportableCertification Exportability
| TrustSignature TrustLevel TrustAmount
| RegularExpression AlmostPublicDomainRegex
| Revocable Revocability
| KeyExpirationTime ThirtyTwoBitDuration
| PreferredSymmetricAlgorithms [SymmetricAlgorithm]
| RevocationKey (Set RevocationClass) PubKeyAlgorithm Fingerprint
| Issuer EightOctetKeyId
| NotationData (Set NotationFlag) NotationName NotationValue
| PreferredHashAlgorithms [HashAlgorithm]
| PreferredCompressionAlgorithms [CompressionAlgorithm]
| KeyServerPreferences (Set KSPFlag)
| PreferredKeyServer KeyServer
| PrimaryUserId Bool
| PolicyURL URL
| KeyFlags (Set KeyFlag)
| SignersUserId Text
| ReasonForRevocation RevocationCode RevocationReason
| Features (Set FeatureFlag)
| SignatureTarget PubKeyAlgorithm HashAlgorithm SignatureHash
| EmbeddedSignature SignaturePayload
| IssuerFingerprint IssuerFingerprintVersion Fingerprint
| IntendedRecipient IssuerFingerprintVersion Fingerprint
| PreferredAEADCiphersuites [(SymmetricAlgorithm, AEADAlgorithm)]
| UserDefinedSigSub Word8 ByteString
| OtherSigSub Word8 ByteString
deriving (Typeable SigSubPacketPayload
Typeable SigSubPacketPayload =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SigSubPacketPayload
-> c SigSubPacketPayload)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigSubPacketPayload)
-> (SigSubPacketPayload -> Constr)
-> (SigSubPacketPayload -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SigSubPacketPayload))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SigSubPacketPayload))
-> ((forall b. Data b => b -> b)
-> SigSubPacketPayload -> SigSubPacketPayload)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigSubPacketPayload -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SigSubPacketPayload -> r)
-> (forall u.
(forall d. Data d => d -> u) -> SigSubPacketPayload -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> SigSubPacketPayload -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SigSubPacketPayload -> m SigSubPacketPayload)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SigSubPacketPayload -> m SigSubPacketPayload)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SigSubPacketPayload -> m SigSubPacketPayload)
-> Data SigSubPacketPayload
SigSubPacketPayload -> Constr
SigSubPacketPayload -> DataType
(forall b. Data b => b -> b)
-> SigSubPacketPayload -> SigSubPacketPayload
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> SigSubPacketPayload -> u
forall u.
(forall d. Data d => d -> u) -> SigSubPacketPayload -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigSubPacketPayload -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SigSubPacketPayload -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SigSubPacketPayload -> m SigSubPacketPayload
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SigSubPacketPayload -> m SigSubPacketPayload
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigSubPacketPayload
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SigSubPacketPayload
-> c SigSubPacketPayload
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SigSubPacketPayload)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SigSubPacketPayload)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SigSubPacketPayload
-> c SigSubPacketPayload
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SigSubPacketPayload
-> c SigSubPacketPayload
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigSubPacketPayload
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigSubPacketPayload
$ctoConstr :: SigSubPacketPayload -> Constr
toConstr :: SigSubPacketPayload -> Constr
$cdataTypeOf :: SigSubPacketPayload -> DataType
dataTypeOf :: SigSubPacketPayload -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SigSubPacketPayload)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SigSubPacketPayload)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SigSubPacketPayload)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SigSubPacketPayload)
$cgmapT :: (forall b. Data b => b -> b)
-> SigSubPacketPayload -> SigSubPacketPayload
gmapT :: (forall b. Data b => b -> b)
-> SigSubPacketPayload -> SigSubPacketPayload
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigSubPacketPayload -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigSubPacketPayload -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SigSubPacketPayload -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SigSubPacketPayload -> r
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> SigSubPacketPayload -> [u]
gmapQ :: forall u.
(forall d. Data d => d -> u) -> SigSubPacketPayload -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SigSubPacketPayload -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SigSubPacketPayload -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SigSubPacketPayload -> m SigSubPacketPayload
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SigSubPacketPayload -> m SigSubPacketPayload
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SigSubPacketPayload -> m SigSubPacketPayload
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SigSubPacketPayload -> m SigSubPacketPayload
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SigSubPacketPayload -> m SigSubPacketPayload
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SigSubPacketPayload -> m SigSubPacketPayload
Data, SigSubPacketPayload -> SigSubPacketPayload -> Bool
(SigSubPacketPayload -> SigSubPacketPayload -> Bool)
-> (SigSubPacketPayload -> SigSubPacketPayload -> Bool)
-> Eq SigSubPacketPayload
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SigSubPacketPayload -> SigSubPacketPayload -> Bool
== :: SigSubPacketPayload -> SigSubPacketPayload -> Bool
$c/= :: SigSubPacketPayload -> SigSubPacketPayload -> Bool
/= :: SigSubPacketPayload -> SigSubPacketPayload -> Bool
Eq, (forall x. SigSubPacketPayload -> Rep SigSubPacketPayload x)
-> (forall x. Rep SigSubPacketPayload x -> SigSubPacketPayload)
-> Generic SigSubPacketPayload
forall x. Rep SigSubPacketPayload x -> SigSubPacketPayload
forall x. SigSubPacketPayload -> Rep SigSubPacketPayload x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SigSubPacketPayload -> Rep SigSubPacketPayload x
from :: forall x. SigSubPacketPayload -> Rep SigSubPacketPayload x
$cto :: forall x. Rep SigSubPacketPayload x -> SigSubPacketPayload
to :: forall x. Rep SigSubPacketPayload x -> SigSubPacketPayload
Generic, Eq SigSubPacketPayload
Eq SigSubPacketPayload =>
(SigSubPacketPayload -> SigSubPacketPayload -> Ordering)
-> (SigSubPacketPayload -> SigSubPacketPayload -> Bool)
-> (SigSubPacketPayload -> SigSubPacketPayload -> Bool)
-> (SigSubPacketPayload -> SigSubPacketPayload -> Bool)
-> (SigSubPacketPayload -> SigSubPacketPayload -> Bool)
-> (SigSubPacketPayload
-> SigSubPacketPayload -> SigSubPacketPayload)
-> (SigSubPacketPayload
-> SigSubPacketPayload -> SigSubPacketPayload)
-> Ord SigSubPacketPayload
SigSubPacketPayload -> SigSubPacketPayload -> Bool
SigSubPacketPayload -> SigSubPacketPayload -> Ordering
SigSubPacketPayload -> SigSubPacketPayload -> SigSubPacketPayload
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: SigSubPacketPayload -> SigSubPacketPayload -> Ordering
compare :: SigSubPacketPayload -> SigSubPacketPayload -> Ordering
$c< :: SigSubPacketPayload -> SigSubPacketPayload -> Bool
< :: SigSubPacketPayload -> SigSubPacketPayload -> Bool
$c<= :: SigSubPacketPayload -> SigSubPacketPayload -> Bool
<= :: SigSubPacketPayload -> SigSubPacketPayload -> Bool
$c> :: SigSubPacketPayload -> SigSubPacketPayload -> Bool
> :: SigSubPacketPayload -> SigSubPacketPayload -> Bool
$c>= :: SigSubPacketPayload -> SigSubPacketPayload -> Bool
>= :: SigSubPacketPayload -> SigSubPacketPayload -> Bool
$cmax :: SigSubPacketPayload -> SigSubPacketPayload -> SigSubPacketPayload
max :: SigSubPacketPayload -> SigSubPacketPayload -> SigSubPacketPayload
$cmin :: SigSubPacketPayload -> SigSubPacketPayload -> SigSubPacketPayload
min :: SigSubPacketPayload -> SigSubPacketPayload -> SigSubPacketPayload
Ord, Int -> SigSubPacketPayload -> ShowS
[SigSubPacketPayload] -> ShowS
SigSubPacketPayload -> String
(Int -> SigSubPacketPayload -> ShowS)
-> (SigSubPacketPayload -> String)
-> ([SigSubPacketPayload] -> ShowS)
-> Show SigSubPacketPayload
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SigSubPacketPayload -> ShowS
showsPrec :: Int -> SigSubPacketPayload -> ShowS
$cshow :: SigSubPacketPayload -> String
show :: SigSubPacketPayload -> String
$cshowList :: [SigSubPacketPayload] -> ShowS
showList :: [SigSubPacketPayload] -> ShowS
Show, Typeable)
instance Hashable SigSubPacketPayload
instance Pretty SigSubPacketPayload where
pretty :: forall ann. SigSubPacketPayload -> Doc ann
pretty (SigCreationTime ThirtyTwoBitTimeStamp
ts) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"creation-time" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> ThirtyTwoBitTimeStamp -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. ThirtyTwoBitTimeStamp -> Doc ann
pretty ThirtyTwoBitTimeStamp
ts
pretty (SigExpirationTime ThirtyTwoBitDuration
d) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"sig expiration time" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> ThirtyTwoBitDuration -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. ThirtyTwoBitDuration -> Doc ann
pretty ThirtyTwoBitDuration
d
pretty (ExportableCertification Exportability
e) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"exportable certification" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Exportability -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. Exportability -> Doc ann
pretty Exportability
e
pretty (TrustSignature TrustLevel
tl TrustAmount
ta) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"trust signature" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> TrustLevel -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. TrustLevel -> Doc ann
pretty TrustLevel
tl Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> TrustAmount -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. TrustAmount -> Doc ann
pretty TrustAmount
ta
pretty (RegularExpression ByteString
apdre) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"regular expression" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> ByteString -> Doc ann
forall ann. ByteString -> Doc ann
prettyLBS ByteString
apdre
pretty (Revocable Revocability
r) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"revocable" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Revocability -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. Revocability -> Doc ann
pretty Revocability
r
pretty (KeyExpirationTime ThirtyTwoBitDuration
d) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"key expiration time" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> ThirtyTwoBitDuration -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. ThirtyTwoBitDuration -> Doc ann
pretty ThirtyTwoBitDuration
d
pretty (PreferredSymmetricAlgorithms [SymmetricAlgorithm]
sas) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"preferred symmetric algorithms" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> [SymmetricAlgorithm] -> Doc ann
forall ann. [SymmetricAlgorithm] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty [SymmetricAlgorithm]
sas
pretty (IntendedRecipient IssuerFingerprintVersion
kv Fingerprint
fp) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"intended recipient (v"
Doc ann -> Doc ann -> Doc ann
forall a. Semigroup a => a -> a -> a
<> IssuerFingerprintVersion -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. IssuerFingerprintVersion -> Doc ann
pretty IssuerFingerprintVersion
kv
Doc ann -> Doc ann -> Doc ann
forall a. Semigroup a => a -> a -> a
<> String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
")"
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Fingerprint -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. Fingerprint -> Doc ann
pretty Fingerprint
fp
pretty (RevocationKey Set RevocationClass
rcs PubKeyAlgorithm
pka Fingerprint
tof) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"revocation key"
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> [RevocationClass] -> Doc ann
forall ann. [RevocationClass] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (Set RevocationClass -> [RevocationClass]
forall a. Set a -> [a]
Set.toList Set RevocationClass
rcs)
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> PubKeyAlgorithm -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. PubKeyAlgorithm -> Doc ann
pretty PubKeyAlgorithm
pka
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Fingerprint -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. Fingerprint -> Doc ann
pretty Fingerprint
tof
pretty (Issuer EightOctetKeyId
eoki) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"issuer" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> EightOctetKeyId -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. EightOctetKeyId -> Doc ann
pretty EightOctetKeyId
eoki
pretty (NotationData Set NotationFlag
nfs NotationName
nn NotationValue
nv) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"notation data"
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> [NotationFlag] -> Doc ann
forall ann. [NotationFlag] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (Set NotationFlag -> [NotationFlag]
forall a. Set a -> [a]
Set.toList Set NotationFlag
nfs)
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> NotationName -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. NotationName -> Doc ann
pretty NotationName
nn
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> NotationValue -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. NotationValue -> Doc ann
pretty NotationValue
nv
pretty (PreferredHashAlgorithms [HashAlgorithm]
phas) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"preferred hash algorithms" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> [HashAlgorithm] -> Doc ann
forall ann. [HashAlgorithm] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty [HashAlgorithm]
phas
pretty (PreferredCompressionAlgorithms [CompressionAlgorithm]
pcas) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"preferred compression algorithms" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> [CompressionAlgorithm] -> Doc ann
forall ann. [CompressionAlgorithm] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty [CompressionAlgorithm]
pcas
pretty (KeyServerPreferences Set KSPFlag
kspfs) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"keyserver preferences" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> [KSPFlag] -> Doc ann
forall ann. [KSPFlag] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (Set KSPFlag -> [KSPFlag]
forall a. Set a -> [a]
Set.toList Set KSPFlag
kspfs)
pretty (PreferredKeyServer ByteString
ks) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"preferred keyserver" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> ByteString -> Doc ann
forall ann. ByteString -> Doc ann
prettyLBS ByteString
ks
pretty (PrimaryUserId Bool
p) =
( if Bool
p
then Doc ann
forall a. Monoid a => a
mempty
else String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"NOT "
)
Doc ann -> Doc ann -> Doc ann
forall a. Semigroup a => a -> a -> a
<> String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"primary user-ID"
pretty (PolicyURL URL
u) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"policy URL" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> URL -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. URL -> Doc ann
pretty URL
u
pretty (KeyFlags Set KeyFlag
kfs) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"key flags" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> [KeyFlag] -> Doc ann
forall ann. [KeyFlag] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (Set KeyFlag -> [KeyFlag]
forall a. Set a -> [a]
Set.toList Set KeyFlag
kfs)
pretty (SignersUserId Text
u) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"signer's user-ID" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Text -> Doc ann
forall ann. Text -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Text
u
pretty (ReasonForRevocation RevocationCode
rc RevocationReason
rr) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"reason for revocation" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> RevocationCode -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. RevocationCode -> Doc ann
pretty RevocationCode
rc Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> RevocationReason -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. RevocationReason -> Doc ann
pretty RevocationReason
rr
pretty (Features Set FeatureFlag
ffs) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"features" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> [FeatureFlag] -> Doc ann
forall ann. [FeatureFlag] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (Set FeatureFlag -> [FeatureFlag]
forall a. Set a -> [a]
Set.toList Set FeatureFlag
ffs)
pretty (SignatureTarget PubKeyAlgorithm
pka HashAlgorithm
ha SignatureHash
sh) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"signature target"
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> PubKeyAlgorithm -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. PubKeyAlgorithm -> Doc ann
pretty PubKeyAlgorithm
pka
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> HashAlgorithm -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. HashAlgorithm -> Doc ann
pretty HashAlgorithm
ha
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> ByteString -> Doc ann
forall ann. ByteString -> Doc ann
prettyBS ((Unwrapped SignatureHash -> SignatureHash)
-> SignatureHash -> Unwrapped SignatureHash
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> SignatureHash
Unwrapped SignatureHash -> SignatureHash
SignatureHash SignatureHash
sh)
pretty (EmbeddedSignature SignaturePayload
sp) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"embedded signature" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> SignaturePayload -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. SignaturePayload -> Doc ann
pretty SignaturePayload
sp
pretty (IssuerFingerprint IssuerFingerprintVersion
kv Fingerprint
ifp) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"issuer fingerprint (v"
Doc ann -> Doc ann -> Doc ann
forall a. Semigroup a => a -> a -> a
<> IssuerFingerprintVersion -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. IssuerFingerprintVersion -> Doc ann
pretty IssuerFingerprintVersion
kv
Doc ann -> Doc ann -> Doc ann
forall a. Semigroup a => a -> a -> a
<> String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
")"
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Fingerprint -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. Fingerprint -> Doc ann
pretty Fingerprint
ifp
pretty (PreferredAEADCiphersuites [(SymmetricAlgorithm, AEADAlgorithm)]
ps) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"preferred AEAD ciphersuites"
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> [(SymmetricAlgorithm, AEADAlgorithm)] -> Doc ann
forall ann. [(SymmetricAlgorithm, AEADAlgorithm)] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty [(SymmetricAlgorithm, AEADAlgorithm)]
ps
pretty (UserDefinedSigSub Word8
t ByteString
bs) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"user-defined signature subpacket type"
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
t
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> [Word8] -> Doc ann
forall ann. [Word8] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (ByteString -> [Word8]
BL.unpack ByteString
bs)
pretty (OtherSigSub Word8
t ByteString
bs) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"unknown signature subpacket type"
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
t
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> ByteString -> Doc ann
forall ann. ByteString -> Doc ann
prettyLBS ByteString
bs
instance A.ToJSON SigSubPacketPayload where
toJSON :: SigSubPacketPayload -> Value
toJSON (SigCreationTime ThirtyTwoBitTimeStamp
ts) = [Pair] -> Value
object [String -> Key
AK.fromString String
"sigCreationTime" Key -> ThirtyTwoBitTimeStamp -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= ThirtyTwoBitTimeStamp
ts]
toJSON (SigExpirationTime ThirtyTwoBitDuration
d) = [Pair] -> Value
object [String -> Key
AK.fromString String
"sigExpirationTime" Key -> ThirtyTwoBitDuration -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= ThirtyTwoBitDuration
d]
toJSON (ExportableCertification Exportability
e) =
[Pair] -> Value
object [String -> Key
AK.fromString String
"exportableCertification" Key -> Exportability -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Exportability
e]
toJSON (TrustSignature TrustLevel
tl TrustAmount
ta) =
[Pair] -> Value
object [String -> Key
AK.fromString String
"trustSignature" Key -> (TrustLevel, TrustAmount) -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= (TrustLevel
tl, TrustAmount
ta)]
toJSON (RegularExpression ByteString
apdre) =
[Pair] -> Value
object [String -> Key
AK.fromString String
"regularExpression" Key -> [Word8] -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= ByteString -> [Word8]
BL.unpack ByteString
apdre]
toJSON (Revocable Revocability
r) = [Pair] -> Value
object [String -> Key
AK.fromString String
"revocable" Key -> Revocability -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Revocability
r]
toJSON (KeyExpirationTime ThirtyTwoBitDuration
d) = [Pair] -> Value
object [String -> Key
AK.fromString String
"keyExpirationTime" Key -> ThirtyTwoBitDuration -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= ThirtyTwoBitDuration
d]
toJSON (PreferredSymmetricAlgorithms [SymmetricAlgorithm]
sas) =
[Pair] -> Value
object [String -> Key
AK.fromString String
"preferredSymmetricAlgorithms" Key -> [SymmetricAlgorithm] -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [SymmetricAlgorithm]
sas]
toJSON (RevocationKey Set RevocationClass
rcs PubKeyAlgorithm
pka Fingerprint
tof) =
[Pair] -> Value
object [String -> Key
AK.fromString String
"revocationKey" Key -> (Set RevocationClass, PubKeyAlgorithm, Fingerprint) -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= (Set RevocationClass
rcs, PubKeyAlgorithm
pka, Fingerprint
tof)]
toJSON (Issuer EightOctetKeyId
eoki) = [Pair] -> Value
object [String -> Key
AK.fromString String
"issuer" Key -> EightOctetKeyId -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= EightOctetKeyId
eoki]
toJSON (NotationData Set NotationFlag
nfs (NotationName ByteString
nn) (NotationValue ByteString
nv)) =
[Pair] -> Value
object
[ String -> Key
AK.fromString String
"notationData" Key -> (Set NotationFlag, [Word8], [Word8]) -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= (Set NotationFlag
nfs, ByteString -> [Word8]
BL.unpack ByteString
nn, ByteString -> [Word8]
BL.unpack ByteString
nv)
]
toJSON (PreferredHashAlgorithms [HashAlgorithm]
phas) =
[Pair] -> Value
object [String -> Key
AK.fromString String
"preferredHashAlgorithms" Key -> [HashAlgorithm] -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [HashAlgorithm]
phas]
toJSON (PreferredCompressionAlgorithms [CompressionAlgorithm]
pcas) =
[Pair] -> Value
object [String -> Key
AK.fromString String
"preferredCompressionAlgorithms" Key -> [CompressionAlgorithm] -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [CompressionAlgorithm]
pcas]
toJSON (KeyServerPreferences Set KSPFlag
kspfs) =
[Pair] -> Value
object [String -> Key
AK.fromString String
"keyServerPreferences" Key -> Set KSPFlag -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Set KSPFlag
kspfs]
toJSON (PreferredKeyServer ByteString
ks) =
[Pair] -> Value
object [String -> Key
AK.fromString String
"preferredKeyServer" Key -> String -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= ByteString -> String
forall a. Show a => a -> String
show ByteString
ks]
toJSON (PrimaryUserId Bool
p) = [Pair] -> Value
object [String -> Key
AK.fromString String
"primaryUserId" Key -> Bool -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Bool
p]
toJSON (PolicyURL URL
u) = [Pair] -> Value
object [String -> Key
AK.fromString String
"policyURL" Key -> URL -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= URL
u]
toJSON (KeyFlags Set KeyFlag
kfs) = [Pair] -> Value
object [String -> Key
AK.fromString String
"keyFlags" Key -> Set KeyFlag -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Set KeyFlag
kfs]
toJSON (SignersUserId Text
u) = [Pair] -> Value
object [String -> Key
AK.fromString String
"signersUserId" Key -> Text -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
u]
toJSON (ReasonForRevocation RevocationCode
rc RevocationReason
rr) =
[Pair] -> Value
object [String -> Key
AK.fromString String
"reasonForRevocation" Key -> (RevocationCode, RevocationReason) -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= (RevocationCode
rc, RevocationReason
rr)]
toJSON (Features Set FeatureFlag
ffs) = [Pair] -> Value
object [String -> Key
AK.fromString String
"features" Key -> Set FeatureFlag -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Set FeatureFlag
ffs]
toJSON (SignatureTarget PubKeyAlgorithm
pka HashAlgorithm
ha SignatureHash
sh) =
[Pair] -> Value
object
[ String -> Key
AK.fromString String
"signatureTarget"
Key -> (PubKeyAlgorithm, HashAlgorithm, [Word8]) -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= (PubKeyAlgorithm
pka, HashAlgorithm
ha, ByteString -> [Word8]
B.unpack ((Unwrapped SignatureHash -> SignatureHash)
-> SignatureHash -> Unwrapped SignatureHash
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> SignatureHash
Unwrapped SignatureHash -> SignatureHash
SignatureHash SignatureHash
sh))
]
toJSON (EmbeddedSignature SignaturePayload
sp) =
[Pair] -> Value
object [String -> Key
AK.fromString String
"embeddedSignature" Key -> SignaturePayload -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= SignaturePayload
sp]
toJSON (IssuerFingerprint IssuerFingerprintVersion
kv Fingerprint
ifp) =
[Pair] -> Value
object [String -> Key
AK.fromString String
"issuerFingerprint" Key -> (IssuerFingerprintVersion, Fingerprint) -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= (IssuerFingerprintVersion
kv, Fingerprint
ifp)]
toJSON (IntendedRecipient IssuerFingerprintVersion
kv Fingerprint
ifp) =
[Pair] -> Value
object [String -> Key
AK.fromString String
"intendedRecipient" Key -> (IssuerFingerprintVersion, Fingerprint) -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= (IssuerFingerprintVersion
kv, Fingerprint
ifp)]
toJSON (PreferredAEADCiphersuites [(SymmetricAlgorithm, AEADAlgorithm)]
ps) =
[Pair] -> Value
object [String -> Key
AK.fromString String
"preferredAEADCiphersuites" Key -> [(SymmetricAlgorithm, AEADAlgorithm)] -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [(SymmetricAlgorithm, AEADAlgorithm)]
ps]
toJSON (UserDefinedSigSub Word8
t ByteString
bs) =
[Pair] -> Value
object [String -> Key
AK.fromString String
"userDefinedSigSub" Key -> (Word8, [Word8]) -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= (Word8
t, ByteString -> [Word8]
BL.unpack ByteString
bs)]
toJSON (OtherSigSub Word8
t ByteString
bs) =
[Pair] -> Value
object [String -> Key
AK.fromString String
"otherSigSub" Key -> (Word8, [Word8]) -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= (Word8
t, ByteString -> [Word8]
BL.unpack ByteString
bs)]
uc3 :: (a -> b -> c -> d) -> (a, b, c) -> d
uc3 :: forall a b c d. (a -> b -> c -> d) -> (a, b, c) -> d
uc3 a -> b -> c -> d
f ~(a
a, b
b, c
c) = a -> b -> c -> d
f a
a b
b c
c
instance A.FromJSON SigSubPacketPayload where
parseJSON :: Value -> Parser SigSubPacketPayload
parseJSON (A.Object Object
v) =
(ThirtyTwoBitTimeStamp -> SigSubPacketPayload
SigCreationTime (ThirtyTwoBitTimeStamp -> SigSubPacketPayload)
-> Parser ThirtyTwoBitTimeStamp -> Parser SigSubPacketPayload
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser ThirtyTwoBitTimeStamp
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"sigCreationTime")
Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
forall a. Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> (ThirtyTwoBitDuration -> SigSubPacketPayload
SigExpirationTime (ThirtyTwoBitDuration -> SigSubPacketPayload)
-> Parser ThirtyTwoBitDuration -> Parser SigSubPacketPayload
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser ThirtyTwoBitDuration
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"sigExpirationTime")
Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
forall a. Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> ( Exportability -> SigSubPacketPayload
ExportableCertification
(Exportability -> SigSubPacketPayload)
-> Parser Exportability -> Parser SigSubPacketPayload
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser Exportability
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"exportableCertification"
)
Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
forall a. Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> ((TrustLevel -> TrustAmount -> SigSubPacketPayload)
-> (TrustLevel, TrustAmount) -> SigSubPacketPayload
forall a b c. (a -> b -> c) -> (a, b) -> c
uncurry TrustLevel -> TrustAmount -> SigSubPacketPayload
TrustSignature ((TrustLevel, TrustAmount) -> SigSubPacketPayload)
-> Parser (TrustLevel, TrustAmount) -> Parser SigSubPacketPayload
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser (TrustLevel, TrustAmount)
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"trustSignature")
Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
forall a. Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> ( ByteString -> SigSubPacketPayload
RegularExpression (ByteString -> SigSubPacketPayload)
-> ([Word8] -> ByteString) -> [Word8] -> SigSubPacketPayload
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Word8] -> ByteString
BL.pack
([Word8] -> SigSubPacketPayload)
-> Parser [Word8] -> Parser SigSubPacketPayload
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser [Word8]
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"regularExpression"
)
Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
forall a. Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> (Revocability -> SigSubPacketPayload
Revocable (Revocability -> SigSubPacketPayload)
-> Parser Revocability -> Parser SigSubPacketPayload
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser Revocability
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"revocable")
Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
forall a. Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> (ThirtyTwoBitDuration -> SigSubPacketPayload
KeyExpirationTime (ThirtyTwoBitDuration -> SigSubPacketPayload)
-> Parser ThirtyTwoBitDuration -> Parser SigSubPacketPayload
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser ThirtyTwoBitDuration
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"keyExpirationTime")
Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
forall a. Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> ( [SymmetricAlgorithm] -> SigSubPacketPayload
PreferredSymmetricAlgorithms
([SymmetricAlgorithm] -> SigSubPacketPayload)
-> Parser [SymmetricAlgorithm] -> Parser SigSubPacketPayload
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser [SymmetricAlgorithm]
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"preferredSymmetricAlgorithms"
)
Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
forall a. Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> ((Set RevocationClass
-> PubKeyAlgorithm -> Fingerprint -> SigSubPacketPayload)
-> (Set RevocationClass, PubKeyAlgorithm, Fingerprint)
-> SigSubPacketPayload
forall a b c d. (a -> b -> c -> d) -> (a, b, c) -> d
uc3 Set RevocationClass
-> PubKeyAlgorithm -> Fingerprint -> SigSubPacketPayload
RevocationKey ((Set RevocationClass, PubKeyAlgorithm, Fingerprint)
-> SigSubPacketPayload)
-> Parser (Set RevocationClass, PubKeyAlgorithm, Fingerprint)
-> Parser SigSubPacketPayload
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object
-> Key
-> Parser (Set RevocationClass, PubKeyAlgorithm, Fingerprint)
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"revocationKey")
Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
forall a. Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> (EightOctetKeyId -> SigSubPacketPayload
Issuer (EightOctetKeyId -> SigSubPacketPayload)
-> Parser EightOctetKeyId -> Parser SigSubPacketPayload
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser EightOctetKeyId
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"issuer")
Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
forall a. Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> ((Set NotationFlag
-> NotationName -> NotationValue -> SigSubPacketPayload)
-> (Set NotationFlag, NotationName, NotationValue)
-> SigSubPacketPayload
forall a b c d. (a -> b -> c -> d) -> (a, b, c) -> d
uc3 Set NotationFlag
-> NotationName -> NotationValue -> SigSubPacketPayload
NotationData ((Set NotationFlag, NotationName, NotationValue)
-> SigSubPacketPayload)
-> Parser (Set NotationFlag, NotationName, NotationValue)
-> Parser SigSubPacketPayload
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object
-> Key -> Parser (Set NotationFlag, NotationName, NotationValue)
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"notationData")
Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
forall a. Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> ( (IssuerFingerprintVersion -> Fingerprint -> SigSubPacketPayload)
-> (IssuerFingerprintVersion, Fingerprint) -> SigSubPacketPayload
forall a b c. (a -> b -> c) -> (a, b) -> c
uncurry IssuerFingerprintVersion -> Fingerprint -> SigSubPacketPayload
IssuerFingerprint
((IssuerFingerprintVersion, Fingerprint) -> SigSubPacketPayload)
-> Parser (IssuerFingerprintVersion, Fingerprint)
-> Parser SigSubPacketPayload
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser (IssuerFingerprintVersion, Fingerprint)
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"issuerFingerprint"
)
Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
forall a. Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> ( (IssuerFingerprintVersion -> Fingerprint -> SigSubPacketPayload)
-> (IssuerFingerprintVersion, Fingerprint) -> SigSubPacketPayload
forall a b c. (a -> b -> c) -> (a, b) -> c
uncurry IssuerFingerprintVersion -> Fingerprint -> SigSubPacketPayload
IntendedRecipient
((IssuerFingerprintVersion, Fingerprint) -> SigSubPacketPayload)
-> Parser (IssuerFingerprintVersion, Fingerprint)
-> Parser SigSubPacketPayload
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser (IssuerFingerprintVersion, Fingerprint)
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"intendedRecipient"
)
Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
forall a. Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> ( [(SymmetricAlgorithm, AEADAlgorithm)] -> SigSubPacketPayload
PreferredAEADCiphersuites
([(SymmetricAlgorithm, AEADAlgorithm)] -> SigSubPacketPayload)
-> Parser [(SymmetricAlgorithm, AEADAlgorithm)]
-> Parser SigSubPacketPayload
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser [(SymmetricAlgorithm, AEADAlgorithm)]
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
AK.fromString String
"preferredAEADCiphersuites"
)
parseJSON Value
_ = Parser SigSubPacketPayload
forall a. Parser a
forall (m :: * -> *) a. MonadPlus m => m a
mzero
data SigSubPacket
= SigSubPacket
{ SigSubPacket -> Bool
_sspCriticality :: Bool
, SigSubPacket -> SigSubPacketPayload
_sspPayload :: SigSubPacketPayload
}
deriving (Typeable SigSubPacket
Typeable SigSubPacket =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SigSubPacket -> c SigSubPacket)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigSubPacket)
-> (SigSubPacket -> Constr)
-> (SigSubPacket -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SigSubPacket))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SigSubPacket))
-> ((forall b. Data b => b -> b) -> SigSubPacket -> SigSubPacket)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigSubPacket -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SigSubPacket -> r)
-> (forall u. (forall d. Data d => d -> u) -> SigSubPacket -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> SigSubPacket -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SigSubPacket -> m SigSubPacket)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SigSubPacket -> m SigSubPacket)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SigSubPacket -> m SigSubPacket)
-> Data SigSubPacket
SigSubPacket -> Constr
SigSubPacket -> DataType
(forall b. Data b => b -> b) -> SigSubPacket -> SigSubPacket
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> SigSubPacket -> u
forall u. (forall d. Data d => d -> u) -> SigSubPacket -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigSubPacket -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SigSubPacket -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SigSubPacket -> m SigSubPacket
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SigSubPacket -> m SigSubPacket
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigSubPacket
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SigSubPacket -> c SigSubPacket
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SigSubPacket)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SigSubPacket)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SigSubPacket -> c SigSubPacket
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SigSubPacket -> c SigSubPacket
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigSubPacket
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigSubPacket
$ctoConstr :: SigSubPacket -> Constr
toConstr :: SigSubPacket -> Constr
$cdataTypeOf :: SigSubPacket -> DataType
dataTypeOf :: SigSubPacket -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SigSubPacket)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SigSubPacket)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SigSubPacket)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SigSubPacket)
$cgmapT :: (forall b. Data b => b -> b) -> SigSubPacket -> SigSubPacket
gmapT :: (forall b. Data b => b -> b) -> SigSubPacket -> SigSubPacket
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigSubPacket -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigSubPacket -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SigSubPacket -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SigSubPacket -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SigSubPacket -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> SigSubPacket -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SigSubPacket -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SigSubPacket -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SigSubPacket -> m SigSubPacket
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SigSubPacket -> m SigSubPacket
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SigSubPacket -> m SigSubPacket
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SigSubPacket -> m SigSubPacket
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SigSubPacket -> m SigSubPacket
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SigSubPacket -> m SigSubPacket
Data, SigSubPacket -> SigSubPacket -> Bool
(SigSubPacket -> SigSubPacket -> Bool)
-> (SigSubPacket -> SigSubPacket -> Bool) -> Eq SigSubPacket
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SigSubPacket -> SigSubPacket -> Bool
== :: SigSubPacket -> SigSubPacket -> Bool
$c/= :: SigSubPacket -> SigSubPacket -> Bool
/= :: SigSubPacket -> SigSubPacket -> Bool
Eq, (forall x. SigSubPacket -> Rep SigSubPacket x)
-> (forall x. Rep SigSubPacket x -> SigSubPacket)
-> Generic SigSubPacket
forall x. Rep SigSubPacket x -> SigSubPacket
forall x. SigSubPacket -> Rep SigSubPacket x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SigSubPacket -> Rep SigSubPacket x
from :: forall x. SigSubPacket -> Rep SigSubPacket x
$cto :: forall x. Rep SigSubPacket x -> SigSubPacket
to :: forall x. Rep SigSubPacket x -> SigSubPacket
Generic, Int -> SigSubPacket -> ShowS
[SigSubPacket] -> ShowS
SigSubPacket -> String
(Int -> SigSubPacket -> ShowS)
-> (SigSubPacket -> String)
-> ([SigSubPacket] -> ShowS)
-> Show SigSubPacket
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SigSubPacket -> ShowS
showsPrec :: Int -> SigSubPacket -> ShowS
$cshow :: SigSubPacket -> String
show :: SigSubPacket -> String
$cshowList :: [SigSubPacket] -> ShowS
showList :: [SigSubPacket] -> ShowS
Show, Typeable)
instance Ord SigSubPacket where
compare :: SigSubPacket -> SigSubPacket -> Ordering
compare (SigSubPacket Bool
crit1 SigSubPacketPayload
payload1) (SigSubPacket Bool
crit2 SigSubPacketPayload
payload2) =
Bool -> Bool -> Ordering
forall a. Ord a => a -> a -> Ordering
compare Bool
crit1 Bool
crit2 Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> SigSubPacketPayload -> SigSubPacketPayload -> Ordering
forall a. Ord a => a -> a -> Ordering
compare SigSubPacketPayload
payload1 SigSubPacketPayload
payload2
instance Pretty SigSubPacket where
pretty :: forall ann. SigSubPacket -> Doc ann
pretty SigSubPacket
x =
( if SigSubPacket -> Bool
_sspCriticality SigSubPacket
x
then Char -> Doc ann
forall ann. Char -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Char
'*'
else Doc ann
forall a. Monoid a => a
mempty
)
Doc ann -> Doc ann -> Doc ann
forall a. Semigroup a => a -> a -> a
<> (SigSubPacketPayload -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. SigSubPacketPayload -> Doc ann
pretty (SigSubPacketPayload -> Doc ann)
-> (SigSubPacket -> SigSubPacketPayload) -> SigSubPacket -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SigSubPacket -> SigSubPacketPayload
_sspPayload) SigSubPacket
x
instance Hashable SigSubPacket
instance A.ToJSON SigSubPacket
instance A.FromJSON SigSubPacket
$(makeLenses ''SigSubPacket)
$(makePrisms ''SignaturePayload)
newtype SubpacketList (hashedness :: Type) (version :: Type)
= SubpacketList [SigSubPacket]
deriving (Typeable (SubpacketList hashedness version)
Typeable (SubpacketList hashedness version) =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SubpacketList hashedness version
-> c (SubpacketList hashedness version))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c (SubpacketList hashedness version))
-> (SubpacketList hashedness version -> Constr)
-> (SubpacketList hashedness version -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c (SubpacketList hashedness version)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (SubpacketList hashedness version)))
-> ((forall b. Data b => b -> b)
-> SubpacketList hashedness version
-> SubpacketList hashedness version)
-> (forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> SubpacketList hashedness version
-> r)
-> (forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> SubpacketList hashedness version
-> r)
-> (forall u.
(forall d. Data d => d -> u)
-> SubpacketList hashedness version -> [u])
-> (forall u.
Int
-> (forall d. Data d => d -> u)
-> SubpacketList hashedness version
-> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SubpacketList hashedness version
-> m (SubpacketList hashedness version))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SubpacketList hashedness version
-> m (SubpacketList hashedness version))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SubpacketList hashedness version
-> m (SubpacketList hashedness version))
-> Data (SubpacketList hashedness version)
SubpacketList hashedness version -> Constr
SubpacketList hashedness version -> DataType
(forall b. Data b => b -> b)
-> SubpacketList hashedness version
-> SubpacketList hashedness version
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int
-> (forall d. Data d => d -> u)
-> SubpacketList hashedness version
-> u
forall u.
(forall d. Data d => d -> u)
-> SubpacketList hashedness version -> [u]
forall hashedness version.
(Data hashedness, Data version) =>
Typeable (SubpacketList hashedness version)
forall hashedness version.
(Data hashedness, Data version) =>
SubpacketList hashedness version -> Constr
forall hashedness version.
(Data hashedness, Data version) =>
SubpacketList hashedness version -> DataType
forall hashedness version.
(Data hashedness, Data version) =>
(forall b. Data b => b -> b)
-> SubpacketList hashedness version
-> SubpacketList hashedness version
forall hashedness version u.
(Data hashedness, Data version) =>
Int
-> (forall d. Data d => d -> u)
-> SubpacketList hashedness version
-> u
forall hashedness version u.
(Data hashedness, Data version) =>
(forall d. Data d => d -> u)
-> SubpacketList hashedness version -> [u]
forall hashedness version r r'.
(Data hashedness, Data version) =>
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> SubpacketList hashedness version
-> r
forall hashedness version r r'.
(Data hashedness, Data version) =>
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> SubpacketList hashedness version
-> r
forall hashedness version (m :: * -> *).
(Data hashedness, Data version, Monad m) =>
(forall d. Data d => d -> m d)
-> SubpacketList hashedness version
-> m (SubpacketList hashedness version)
forall hashedness version (m :: * -> *).
(Data hashedness, Data version, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> SubpacketList hashedness version
-> m (SubpacketList hashedness version)
forall hashedness version (c :: * -> *).
(Data hashedness, Data version) =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c (SubpacketList hashedness version)
forall hashedness version (c :: * -> *).
(Data hashedness, Data version) =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SubpacketList hashedness version
-> c (SubpacketList hashedness version)
forall hashedness version (t :: * -> *) (c :: * -> *).
(Data hashedness, Data version, Typeable t) =>
(forall d. Data d => c (t d))
-> Maybe (c (SubpacketList hashedness version))
forall hashedness version (t :: * -> * -> *) (c :: * -> *).
(Data hashedness, Data version, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (SubpacketList hashedness version))
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> SubpacketList hashedness version
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> SubpacketList hashedness version
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SubpacketList hashedness version
-> m (SubpacketList hashedness version)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SubpacketList hashedness version
-> m (SubpacketList hashedness version)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c (SubpacketList hashedness version)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SubpacketList hashedness version
-> c (SubpacketList hashedness version)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c (SubpacketList hashedness version))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (SubpacketList hashedness version))
$cgfoldl :: forall hashedness version (c :: * -> *).
(Data hashedness, Data version) =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SubpacketList hashedness version
-> c (SubpacketList hashedness version)
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SubpacketList hashedness version
-> c (SubpacketList hashedness version)
$cgunfold :: forall hashedness version (c :: * -> *).
(Data hashedness, Data version) =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c (SubpacketList hashedness version)
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c (SubpacketList hashedness version)
$ctoConstr :: forall hashedness version.
(Data hashedness, Data version) =>
SubpacketList hashedness version -> Constr
toConstr :: SubpacketList hashedness version -> Constr
$cdataTypeOf :: forall hashedness version.
(Data hashedness, Data version) =>
SubpacketList hashedness version -> DataType
dataTypeOf :: SubpacketList hashedness version -> DataType
$cdataCast1 :: forall hashedness version (t :: * -> *) (c :: * -> *).
(Data hashedness, Data version, Typeable t) =>
(forall d. Data d => c (t d))
-> Maybe (c (SubpacketList hashedness version))
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c (SubpacketList hashedness version))
$cdataCast2 :: forall hashedness version (t :: * -> * -> *) (c :: * -> *).
(Data hashedness, Data version, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (SubpacketList hashedness version))
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (SubpacketList hashedness version))
$cgmapT :: forall hashedness version.
(Data hashedness, Data version) =>
(forall b. Data b => b -> b)
-> SubpacketList hashedness version
-> SubpacketList hashedness version
gmapT :: (forall b. Data b => b -> b)
-> SubpacketList hashedness version
-> SubpacketList hashedness version
$cgmapQl :: forall hashedness version r r'.
(Data hashedness, Data version) =>
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> SubpacketList hashedness version
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> SubpacketList hashedness version
-> r
$cgmapQr :: forall hashedness version r r'.
(Data hashedness, Data version) =>
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> SubpacketList hashedness version
-> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> SubpacketList hashedness version
-> r
$cgmapQ :: forall hashedness version u.
(Data hashedness, Data version) =>
(forall d. Data d => d -> u)
-> SubpacketList hashedness version -> [u]
gmapQ :: forall u.
(forall d. Data d => d -> u)
-> SubpacketList hashedness version -> [u]
$cgmapQi :: forall hashedness version u.
(Data hashedness, Data version) =>
Int
-> (forall d. Data d => d -> u)
-> SubpacketList hashedness version
-> u
gmapQi :: forall u.
Int
-> (forall d. Data d => d -> u)
-> SubpacketList hashedness version
-> u
$cgmapM :: forall hashedness version (m :: * -> *).
(Data hashedness, Data version, Monad m) =>
(forall d. Data d => d -> m d)
-> SubpacketList hashedness version
-> m (SubpacketList hashedness version)
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SubpacketList hashedness version
-> m (SubpacketList hashedness version)
$cgmapMp :: forall hashedness version (m :: * -> *).
(Data hashedness, Data version, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> SubpacketList hashedness version
-> m (SubpacketList hashedness version)
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SubpacketList hashedness version
-> m (SubpacketList hashedness version)
$cgmapMo :: forall hashedness version (m :: * -> *).
(Data hashedness, Data version, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> SubpacketList hashedness version
-> m (SubpacketList hashedness version)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SubpacketList hashedness version
-> m (SubpacketList hashedness version)
Data, SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool
(SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool)
-> (SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool)
-> Eq (SubpacketList hashedness version)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall hashedness version.
SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool
$c== :: forall hashedness version.
SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool
== :: SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool
$c/= :: forall hashedness version.
SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool
/= :: SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool
Eq, (forall x.
SubpacketList hashedness version
-> Rep (SubpacketList hashedness version) x)
-> (forall x.
Rep (SubpacketList hashedness version) x
-> SubpacketList hashedness version)
-> Generic (SubpacketList hashedness version)
forall x.
Rep (SubpacketList hashedness version) x
-> SubpacketList hashedness version
forall x.
SubpacketList hashedness version
-> Rep (SubpacketList hashedness version) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall hashedness version x.
Rep (SubpacketList hashedness version) x
-> SubpacketList hashedness version
forall hashedness version x.
SubpacketList hashedness version
-> Rep (SubpacketList hashedness version) x
$cfrom :: forall hashedness version x.
SubpacketList hashedness version
-> Rep (SubpacketList hashedness version) x
from :: forall x.
SubpacketList hashedness version
-> Rep (SubpacketList hashedness version) x
$cto :: forall hashedness version x.
Rep (SubpacketList hashedness version) x
-> SubpacketList hashedness version
to :: forall x.
Rep (SubpacketList hashedness version) x
-> SubpacketList hashedness version
Generic, Eq (SubpacketList hashedness version)
Eq (SubpacketList hashedness version) =>
(SubpacketList hashedness version
-> SubpacketList hashedness version -> Ordering)
-> (SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool)
-> (SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool)
-> (SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool)
-> (SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool)
-> (SubpacketList hashedness version
-> SubpacketList hashedness version
-> SubpacketList hashedness version)
-> (SubpacketList hashedness version
-> SubpacketList hashedness version
-> SubpacketList hashedness version)
-> Ord (SubpacketList hashedness version)
SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool
SubpacketList hashedness version
-> SubpacketList hashedness version -> Ordering
SubpacketList hashedness version
-> SubpacketList hashedness version
-> SubpacketList hashedness version
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall hashedness version. Eq (SubpacketList hashedness version)
forall hashedness version.
SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool
forall hashedness version.
SubpacketList hashedness version
-> SubpacketList hashedness version -> Ordering
forall hashedness version.
SubpacketList hashedness version
-> SubpacketList hashedness version
-> SubpacketList hashedness version
$ccompare :: forall hashedness version.
SubpacketList hashedness version
-> SubpacketList hashedness version -> Ordering
compare :: SubpacketList hashedness version
-> SubpacketList hashedness version -> Ordering
$c< :: forall hashedness version.
SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool
< :: SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool
$c<= :: forall hashedness version.
SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool
<= :: SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool
$c> :: forall hashedness version.
SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool
> :: SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool
$c>= :: forall hashedness version.
SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool
>= :: SubpacketList hashedness version
-> SubpacketList hashedness version -> Bool
$cmax :: forall hashedness version.
SubpacketList hashedness version
-> SubpacketList hashedness version
-> SubpacketList hashedness version
max :: SubpacketList hashedness version
-> SubpacketList hashedness version
-> SubpacketList hashedness version
$cmin :: forall hashedness version.
SubpacketList hashedness version
-> SubpacketList hashedness version
-> SubpacketList hashedness version
min :: SubpacketList hashedness version
-> SubpacketList hashedness version
-> SubpacketList hashedness version
Ord, Int -> SubpacketList hashedness version -> ShowS
[SubpacketList hashedness version] -> ShowS
SubpacketList hashedness version -> String
(Int -> SubpacketList hashedness version -> ShowS)
-> (SubpacketList hashedness version -> String)
-> ([SubpacketList hashedness version] -> ShowS)
-> Show (SubpacketList hashedness version)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
forall hashedness version.
Int -> SubpacketList hashedness version -> ShowS
forall hashedness version.
[SubpacketList hashedness version] -> ShowS
forall hashedness version.
SubpacketList hashedness version -> String
$cshowsPrec :: forall hashedness version.
Int -> SubpacketList hashedness version -> ShowS
showsPrec :: Int -> SubpacketList hashedness version -> ShowS
$cshow :: forall hashedness version.
SubpacketList hashedness version -> String
show :: SubpacketList hashedness version -> String
$cshowList :: forall hashedness version.
[SubpacketList hashedness version] -> ShowS
showList :: [SubpacketList hashedness version] -> ShowS
Show, Typeable)
instance Functor (SubpacketList h) where
fmap :: forall a b. (a -> b) -> SubpacketList h a -> SubpacketList h b
fmap a -> b
_ (SubpacketList [SigSubPacket]
sps) = [SigSubPacket] -> SubpacketList h b
forall hashedness version.
[SigSubPacket] -> SubpacketList hashedness version
SubpacketList [SigSubPacket]
sps
fromSubpacketList :: SubpacketList h v -> [SigSubPacket]
fromSubpacketList :: forall h v. SubpacketList h v -> [SigSubPacket]
fromSubpacketList (SubpacketList [SigSubPacket]
sps) = [SigSubPacket]
sps
toSubpacketList :: [SigSubPacket] -> SubpacketList h v
toSubpacketList :: forall hashedness version.
[SigSubPacket] -> SubpacketList hashedness version
toSubpacketList = [SigSubPacket] -> SubpacketList h v
forall hashedness version.
[SigSubPacket] -> SubpacketList hashedness version
SubpacketList
emptyHashedSubpackets :: SubpacketList Hashed v
emptyHashedSubpackets :: forall v. SubpacketList Hashed v
emptyHashedSubpackets = [SigSubPacket] -> SubpacketList Hashed v
forall hashedness version.
[SigSubPacket] -> SubpacketList hashedness version
SubpacketList []
emptyUnhashedSubpackets :: SubpacketList Unhashed v
emptyUnhashedSubpackets :: forall v. SubpacketList Unhashed v
emptyUnhashedSubpackets = [SigSubPacket] -> SubpacketList Unhashed v
forall hashedness version.
[SigSubPacket] -> SubpacketList hashedness version
SubpacketList []
consHashedSubpacket
:: SigSubPacket -> SubpacketList Hashed v -> SubpacketList Hashed v
consHashedSubpacket :: forall v.
SigSubPacket -> SubpacketList Hashed v -> SubpacketList Hashed v
consHashedSubpacket SigSubPacket
sp (SubpacketList [SigSubPacket]
sps) = [SigSubPacket] -> SubpacketList Hashed v
forall hashedness version.
[SigSubPacket] -> SubpacketList hashedness version
SubpacketList (SigSubPacket
sp SigSubPacket -> [SigSubPacket] -> [SigSubPacket]
forall a. a -> [a] -> [a]
: [SigSubPacket]
sps)
consUnhashedSubpacket
:: SigSubPacket
-> SubpacketList Unhashed v
-> SubpacketList Unhashed v
consUnhashedSubpacket :: forall v.
SigSubPacket
-> SubpacketList Unhashed v -> SubpacketList Unhashed v
consUnhashedSubpacket SigSubPacket
sp (SubpacketList [SigSubPacket]
sps) = [SigSubPacket] -> SubpacketList Unhashed v
forall hashedness version.
[SigSubPacket] -> SubpacketList hashedness version
SubpacketList (SigSubPacket
sp SigSubPacket -> [SigSubPacket] -> [SigSubPacket]
forall a. a -> [a] -> [a]
: [SigSubPacket]
sps)
data KeyVersion
= DeprecatedV3
| V4
| V6
deriving (Typeable KeyVersion
Typeable KeyVersion =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KeyVersion -> c KeyVersion)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KeyVersion)
-> (KeyVersion -> Constr)
-> (KeyVersion -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KeyVersion))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c KeyVersion))
-> ((forall b. Data b => b -> b) -> KeyVersion -> KeyVersion)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KeyVersion -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> KeyVersion -> r)
-> (forall u. (forall d. Data d => d -> u) -> KeyVersion -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> KeyVersion -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KeyVersion -> m KeyVersion)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyVersion -> m KeyVersion)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyVersion -> m KeyVersion)
-> Data KeyVersion
KeyVersion -> Constr
KeyVersion -> DataType
(forall b. Data b => b -> b) -> KeyVersion -> KeyVersion
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> KeyVersion -> u
forall u. (forall d. Data d => d -> u) -> KeyVersion -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KeyVersion -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> KeyVersion -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KeyVersion -> m KeyVersion
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyVersion -> m KeyVersion
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KeyVersion
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KeyVersion -> c KeyVersion
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KeyVersion)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KeyVersion)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KeyVersion -> c KeyVersion
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KeyVersion -> c KeyVersion
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KeyVersion
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KeyVersion
$ctoConstr :: KeyVersion -> Constr
toConstr :: KeyVersion -> Constr
$cdataTypeOf :: KeyVersion -> DataType
dataTypeOf :: KeyVersion -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KeyVersion)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KeyVersion)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KeyVersion)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KeyVersion)
$cgmapT :: (forall b. Data b => b -> b) -> KeyVersion -> KeyVersion
gmapT :: (forall b. Data b => b -> b) -> KeyVersion -> KeyVersion
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KeyVersion -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KeyVersion -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> KeyVersion -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> KeyVersion -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> KeyVersion -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> KeyVersion -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> KeyVersion -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> KeyVersion -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KeyVersion -> m KeyVersion
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KeyVersion -> m KeyVersion
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyVersion -> m KeyVersion
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyVersion -> m KeyVersion
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyVersion -> m KeyVersion
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> KeyVersion -> m KeyVersion
Data, KeyVersion -> KeyVersion -> Bool
(KeyVersion -> KeyVersion -> Bool)
-> (KeyVersion -> KeyVersion -> Bool) -> Eq KeyVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: KeyVersion -> KeyVersion -> Bool
== :: KeyVersion -> KeyVersion -> Bool
$c/= :: KeyVersion -> KeyVersion -> Bool
/= :: KeyVersion -> KeyVersion -> Bool
Eq, (forall x. KeyVersion -> Rep KeyVersion x)
-> (forall x. Rep KeyVersion x -> KeyVersion) -> Generic KeyVersion
forall x. Rep KeyVersion x -> KeyVersion
forall x. KeyVersion -> Rep KeyVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. KeyVersion -> Rep KeyVersion x
from :: forall x. KeyVersion -> Rep KeyVersion x
$cto :: forall x. Rep KeyVersion x -> KeyVersion
to :: forall x. Rep KeyVersion x -> KeyVersion
Generic, Eq KeyVersion
Eq KeyVersion =>
(KeyVersion -> KeyVersion -> Ordering)
-> (KeyVersion -> KeyVersion -> Bool)
-> (KeyVersion -> KeyVersion -> Bool)
-> (KeyVersion -> KeyVersion -> Bool)
-> (KeyVersion -> KeyVersion -> Bool)
-> (KeyVersion -> KeyVersion -> KeyVersion)
-> (KeyVersion -> KeyVersion -> KeyVersion)
-> Ord KeyVersion
KeyVersion -> KeyVersion -> Bool
KeyVersion -> KeyVersion -> Ordering
KeyVersion -> KeyVersion -> KeyVersion
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: KeyVersion -> KeyVersion -> Ordering
compare :: KeyVersion -> KeyVersion -> Ordering
$c< :: KeyVersion -> KeyVersion -> Bool
< :: KeyVersion -> KeyVersion -> Bool
$c<= :: KeyVersion -> KeyVersion -> Bool
<= :: KeyVersion -> KeyVersion -> Bool
$c> :: KeyVersion -> KeyVersion -> Bool
> :: KeyVersion -> KeyVersion -> Bool
$c>= :: KeyVersion -> KeyVersion -> Bool
>= :: KeyVersion -> KeyVersion -> Bool
$cmax :: KeyVersion -> KeyVersion -> KeyVersion
max :: KeyVersion -> KeyVersion -> KeyVersion
$cmin :: KeyVersion -> KeyVersion -> KeyVersion
min :: KeyVersion -> KeyVersion -> KeyVersion
Ord, Int -> KeyVersion -> ShowS
[KeyVersion] -> ShowS
KeyVersion -> String
(Int -> KeyVersion -> ShowS)
-> (KeyVersion -> String)
-> ([KeyVersion] -> ShowS)
-> Show KeyVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> KeyVersion -> ShowS
showsPrec :: Int -> KeyVersion -> ShowS
$cshow :: KeyVersion -> String
show :: KeyVersion -> String
$cshowList :: [KeyVersion] -> ShowS
showList :: [KeyVersion] -> ShowS
Show, Typeable)
instance Hashable KeyVersion
instance Pretty KeyVersion where
pretty :: forall ann. KeyVersion -> Doc ann
pretty KeyVersion
DeprecatedV3 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"(deprecated) v3"
pretty KeyVersion
V4 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"v4"
pretty KeyVersion
V6 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"v6"
$(ATH.deriveJSON ATH.defaultOptions ''KeyVersion)
newtype IV
= IV
{ IV -> ByteString
unIV :: B.ByteString
}
deriving
( Eq IV
Ord IV
Monoid IV
ByteArrayAccess IV
(Eq IV, Ord IV, Monoid IV, ByteArrayAccess IV) =>
(forall p a. Int -> (Ptr p -> IO a) -> IO (a, IV)) -> ByteArray IV
forall ba.
(Eq ba, Ord ba, Monoid ba, ByteArrayAccess ba) =>
(forall p a. Int -> (Ptr p -> IO a) -> IO (a, ba)) -> ByteArray ba
forall p a. Int -> (Ptr p -> IO a) -> IO (a, IV)
$callocRet :: forall p a. Int -> (Ptr p -> IO a) -> IO (a, IV)
allocRet :: forall p a. Int -> (Ptr p -> IO a) -> IO (a, IV)
ByteArray
, IV -> Int
(IV -> Int)
-> (forall p a. IV -> (Ptr p -> IO a) -> IO a)
-> (forall p. IV -> Ptr p -> IO ())
-> ByteArrayAccess IV
forall p. IV -> Ptr p -> IO ()
forall ba.
(ba -> Int)
-> (forall p a. ba -> (Ptr p -> IO a) -> IO a)
-> (forall p. ba -> Ptr p -> IO ())
-> ByteArrayAccess ba
forall p a. IV -> (Ptr p -> IO a) -> IO a
$clength :: IV -> Int
length :: IV -> Int
$cwithByteArray :: forall p a. IV -> (Ptr p -> IO a) -> IO a
withByteArray :: forall p a. IV -> (Ptr p -> IO a) -> IO a
$ccopyByteArrayToPtr :: forall p. IV -> Ptr p -> IO ()
copyByteArrayToPtr :: forall p. IV -> Ptr p -> IO ()
ByteArrayAccess
, Typeable IV
Typeable IV =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IV -> c IV)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IV)
-> (IV -> Constr)
-> (IV -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IV))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IV))
-> ((forall b. Data b => b -> b) -> IV -> IV)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IV -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IV -> r)
-> (forall u. (forall d. Data d => d -> u) -> IV -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> IV -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> IV -> m IV)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> IV -> m IV)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> IV -> m IV)
-> Data IV
IV -> Constr
IV -> DataType
(forall b. Data b => b -> b) -> IV -> IV
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> IV -> u
forall u. (forall d. Data d => d -> u) -> IV -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IV -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IV -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> IV -> m IV
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> IV -> m IV
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IV
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IV -> c IV
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IV)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IV)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IV -> c IV
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IV -> c IV
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IV
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IV
$ctoConstr :: IV -> Constr
toConstr :: IV -> Constr
$cdataTypeOf :: IV -> DataType
dataTypeOf :: IV -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IV)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IV)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IV)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IV)
$cgmapT :: (forall b. Data b => b -> b) -> IV -> IV
gmapT :: (forall b. Data b => b -> b) -> IV -> IV
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IV -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IV -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IV -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IV -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> IV -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> IV -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> IV -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> IV -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> IV -> m IV
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> IV -> m IV
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> IV -> m IV
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> IV -> m IV
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> IV -> m IV
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> IV -> m IV
Data
, IV -> IV -> Bool
(IV -> IV -> Bool) -> (IV -> IV -> Bool) -> Eq IV
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IV -> IV -> Bool
== :: IV -> IV -> Bool
$c/= :: IV -> IV -> Bool
/= :: IV -> IV -> Bool
Eq
, (forall x. IV -> Rep IV x)
-> (forall x. Rep IV x -> IV) -> Generic IV
forall x. Rep IV x -> IV
forall x. IV -> Rep IV x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. IV -> Rep IV x
from :: forall x. IV -> Rep IV x
$cto :: forall x. Rep IV x -> IV
to :: forall x. Rep IV x -> IV
Generic
, Eq IV
Eq IV => (Int -> IV -> Int) -> (IV -> Int) -> Hashable IV
Int -> IV -> Int
IV -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> IV -> Int
hashWithSalt :: Int -> IV -> Int
$chash :: IV -> Int
hash :: IV -> Int
Hashable
, Semigroup IV
IV
Semigroup IV => IV -> (IV -> IV -> IV) -> ([IV] -> IV) -> Monoid IV
[IV] -> IV
IV -> IV -> IV
forall a.
Semigroup a =>
a -> (a -> a -> a) -> ([a] -> a) -> Monoid a
$cmempty :: IV
mempty :: IV
$cmappend :: IV -> IV -> IV
mappend :: IV -> IV -> IV
$cmconcat :: [IV] -> IV
mconcat :: [IV] -> IV
Monoid
, NonEmpty IV -> IV
IV -> IV -> IV
(IV -> IV -> IV)
-> (NonEmpty IV -> IV)
-> (forall b. Integral b => b -> IV -> IV)
-> Semigroup IV
forall b. Integral b => b -> IV -> IV
forall a.
(a -> a -> a)
-> (NonEmpty a -> a)
-> (forall b. Integral b => b -> a -> a)
-> Semigroup a
$c<> :: IV -> IV -> IV
<> :: IV -> IV -> IV
$csconcat :: NonEmpty IV -> IV
sconcat :: NonEmpty IV -> IV
$cstimes :: forall b. Integral b => b -> IV -> IV
stimes :: forall b. Integral b => b -> IV -> IV
Semigroup
, Int -> IV -> ShowS
[IV] -> ShowS
IV -> String
(Int -> IV -> ShowS)
-> (IV -> String) -> ([IV] -> ShowS) -> Show IV
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IV -> ShowS
showsPrec :: Int -> IV -> ShowS
$cshow :: IV -> String
show :: IV -> String
$cshowList :: [IV] -> ShowS
showList :: [IV] -> ShowS
Show
, Typeable
)
instance Wrapped IV
instance Ord IV where
compare :: IV -> IV -> Ordering
compare (IV ByteString
b1) (IV ByteString
b2) = ByteString -> ByteString -> Ordering
forall a. Ord a => a -> a -> Ordering
compare ByteString
b1 ByteString
b2
instance Pretty IV where
pretty :: forall ann. IV -> Doc ann
pretty = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (String -> Doc ann) -> (IV -> String) -> IV -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (String
"iv:" String -> ShowS
forall a. [a] -> [a] -> [a]
++) ShowS -> (IV -> String) -> IV -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> String
bsToHexUpper (ByteString -> String) -> (IV -> ByteString) -> IV -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped IV -> IV) -> IV -> Unwrapped IV
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> IV
Unwrapped IV -> IV
IV
instance A.ToJSON IV where
toJSON :: IV -> Value
toJSON = String -> Value
forall a. ToJSON a => a -> Value
A.toJSON (String -> Value) -> (IV -> String) -> IV -> Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> String
forall a. Show a => a -> String
show (ByteString -> String) -> (IV -> ByteString) -> IV -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped IV -> IV) -> IV -> Unwrapped IV
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> IV
Unwrapped IV -> IV
IV
data LiteralDataType
= BinaryData
| TextData
| UTF8Data
| OtherData Word8
deriving (Typeable LiteralDataType
Typeable LiteralDataType =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LiteralDataType -> c LiteralDataType)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LiteralDataType)
-> (LiteralDataType -> Constr)
-> (LiteralDataType -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LiteralDataType))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c LiteralDataType))
-> ((forall b. Data b => b -> b)
-> LiteralDataType -> LiteralDataType)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralDataType -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralDataType -> r)
-> (forall u.
(forall d. Data d => d -> u) -> LiteralDataType -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> LiteralDataType -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> LiteralDataType -> m LiteralDataType)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> LiteralDataType -> m LiteralDataType)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> LiteralDataType -> m LiteralDataType)
-> Data LiteralDataType
LiteralDataType -> Constr
LiteralDataType -> DataType
(forall b. Data b => b -> b) -> LiteralDataType -> LiteralDataType
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> LiteralDataType -> u
forall u. (forall d. Data d => d -> u) -> LiteralDataType -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralDataType -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralDataType -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> LiteralDataType -> m LiteralDataType
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> LiteralDataType -> m LiteralDataType
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LiteralDataType
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LiteralDataType -> c LiteralDataType
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LiteralDataType)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c LiteralDataType)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LiteralDataType -> c LiteralDataType
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LiteralDataType -> c LiteralDataType
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LiteralDataType
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LiteralDataType
$ctoConstr :: LiteralDataType -> Constr
toConstr :: LiteralDataType -> Constr
$cdataTypeOf :: LiteralDataType -> DataType
dataTypeOf :: LiteralDataType -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LiteralDataType)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LiteralDataType)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c LiteralDataType)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c LiteralDataType)
$cgmapT :: (forall b. Data b => b -> b) -> LiteralDataType -> LiteralDataType
gmapT :: (forall b. Data b => b -> b) -> LiteralDataType -> LiteralDataType
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralDataType -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralDataType -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralDataType -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralDataType -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> LiteralDataType -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> LiteralDataType -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> LiteralDataType -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> LiteralDataType -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> LiteralDataType -> m LiteralDataType
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> LiteralDataType -> m LiteralDataType
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> LiteralDataType -> m LiteralDataType
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> LiteralDataType -> m LiteralDataType
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> LiteralDataType -> m LiteralDataType
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> LiteralDataType -> m LiteralDataType
Data, (forall x. LiteralDataType -> Rep LiteralDataType x)
-> (forall x. Rep LiteralDataType x -> LiteralDataType)
-> Generic LiteralDataType
forall x. Rep LiteralDataType x -> LiteralDataType
forall x. LiteralDataType -> Rep LiteralDataType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. LiteralDataType -> Rep LiteralDataType x
from :: forall x. LiteralDataType -> Rep LiteralDataType x
$cto :: forall x. Rep LiteralDataType x -> LiteralDataType
to :: forall x. Rep LiteralDataType x -> LiteralDataType
Generic, Int -> LiteralDataType -> ShowS
[LiteralDataType] -> ShowS
LiteralDataType -> String
(Int -> LiteralDataType -> ShowS)
-> (LiteralDataType -> String)
-> ([LiteralDataType] -> ShowS)
-> Show LiteralDataType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LiteralDataType -> ShowS
showsPrec :: Int -> LiteralDataType -> ShowS
$cshow :: LiteralDataType -> String
show :: LiteralDataType -> String
$cshowList :: [LiteralDataType] -> ShowS
showList :: [LiteralDataType] -> ShowS
Show, Typeable)
instance Hashable LiteralDataType
instance Eq LiteralDataType where
== :: LiteralDataType -> LiteralDataType -> Bool
(==) LiteralDataType
a LiteralDataType
b = LiteralDataType -> Word8
forall a. FutureVal a => a -> Word8
fromFVal LiteralDataType
a Word8 -> Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== LiteralDataType -> Word8
forall a. FutureVal a => a -> Word8
fromFVal LiteralDataType
b
instance Ord LiteralDataType where
compare :: LiteralDataType -> LiteralDataType -> Ordering
compare = (LiteralDataType -> Word8)
-> LiteralDataType -> LiteralDataType -> Ordering
forall a b. Ord a => (b -> a) -> b -> b -> Ordering
comparing LiteralDataType -> Word8
forall a. FutureVal a => a -> Word8
fromFVal
instance FutureVal LiteralDataType where
fromFVal :: LiteralDataType -> Word8
fromFVal LiteralDataType
BinaryData = Int -> Word8
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word8) -> (Char -> Int) -> Char -> Word8
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Char -> Int
forall a. Enum a => a -> Int
fromEnum (Char -> Word8) -> Char -> Word8
forall a b. (a -> b) -> a -> b
$ Char
'b'
fromFVal LiteralDataType
TextData = Int -> Word8
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word8) -> (Char -> Int) -> Char -> Word8
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Char -> Int
forall a. Enum a => a -> Int
fromEnum (Char -> Word8) -> Char -> Word8
forall a b. (a -> b) -> a -> b
$ Char
't'
fromFVal LiteralDataType
UTF8Data = Int -> Word8
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word8) -> (Char -> Int) -> Char -> Word8
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Char -> Int
forall a. Enum a => a -> Int
fromEnum (Char -> Word8) -> Char -> Word8
forall a b. (a -> b) -> a -> b
$ Char
'u'
fromFVal (OtherData Word8
o) = Word8
o
toFVal :: Word8 -> LiteralDataType
toFVal Word8
0x62 = LiteralDataType
BinaryData
toFVal Word8
0x74 = LiteralDataType
TextData
toFVal Word8
0x75 = LiteralDataType
UTF8Data
toFVal Word8
o = Word8 -> LiteralDataType
OtherData Word8
o
instance Pretty LiteralDataType where
pretty :: forall ann. LiteralDataType -> Doc ann
pretty LiteralDataType
BinaryData = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"binary"
pretty LiteralDataType
TextData = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"text"
pretty LiteralDataType
UTF8Data = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"UTF-8"
pretty (OtherData Word8
o) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"other data type " Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
o
$(ATH.deriveJSON ATH.defaultOptions ''LiteralDataType)
newtype SessionKey
= SessionKey
{ SessionKey -> ByteString
unSessionKey :: B.ByteString
}
deriving
( Eq SessionKey
Ord SessionKey
Monoid SessionKey
ByteArrayAccess SessionKey
(Eq SessionKey, Ord SessionKey, Monoid SessionKey,
ByteArrayAccess SessionKey) =>
(forall p a. Int -> (Ptr p -> IO a) -> IO (a, SessionKey))
-> ByteArray SessionKey
forall ba.
(Eq ba, Ord ba, Monoid ba, ByteArrayAccess ba) =>
(forall p a. Int -> (Ptr p -> IO a) -> IO (a, ba)) -> ByteArray ba
forall p a. Int -> (Ptr p -> IO a) -> IO (a, SessionKey)
$callocRet :: forall p a. Int -> (Ptr p -> IO a) -> IO (a, SessionKey)
allocRet :: forall p a. Int -> (Ptr p -> IO a) -> IO (a, SessionKey)
ByteArray
, SessionKey -> Int
(SessionKey -> Int)
-> (forall p a. SessionKey -> (Ptr p -> IO a) -> IO a)
-> (forall p. SessionKey -> Ptr p -> IO ())
-> ByteArrayAccess SessionKey
forall p. SessionKey -> Ptr p -> IO ()
forall ba.
(ba -> Int)
-> (forall p a. ba -> (Ptr p -> IO a) -> IO a)
-> (forall p. ba -> Ptr p -> IO ())
-> ByteArrayAccess ba
forall p a. SessionKey -> (Ptr p -> IO a) -> IO a
$clength :: SessionKey -> Int
length :: SessionKey -> Int
$cwithByteArray :: forall p a. SessionKey -> (Ptr p -> IO a) -> IO a
withByteArray :: forall p a. SessionKey -> (Ptr p -> IO a) -> IO a
$ccopyByteArrayToPtr :: forall p. SessionKey -> Ptr p -> IO ()
copyByteArrayToPtr :: forall p. SessionKey -> Ptr p -> IO ()
ByteArrayAccess
, Typeable SessionKey
Typeable SessionKey =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SessionKey -> c SessionKey)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SessionKey)
-> (SessionKey -> Constr)
-> (SessionKey -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SessionKey))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SessionKey))
-> ((forall b. Data b => b -> b) -> SessionKey -> SessionKey)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SessionKey -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SessionKey -> r)
-> (forall u. (forall d. Data d => d -> u) -> SessionKey -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> SessionKey -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SessionKey -> m SessionKey)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SessionKey -> m SessionKey)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SessionKey -> m SessionKey)
-> Data SessionKey
SessionKey -> Constr
SessionKey -> DataType
(forall b. Data b => b -> b) -> SessionKey -> SessionKey
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> SessionKey -> u
forall u. (forall d. Data d => d -> u) -> SessionKey -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SessionKey -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SessionKey -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SessionKey -> m SessionKey
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SessionKey -> m SessionKey
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SessionKey
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SessionKey -> c SessionKey
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SessionKey)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SessionKey)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SessionKey -> c SessionKey
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SessionKey -> c SessionKey
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SessionKey
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SessionKey
$ctoConstr :: SessionKey -> Constr
toConstr :: SessionKey -> Constr
$cdataTypeOf :: SessionKey -> DataType
dataTypeOf :: SessionKey -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SessionKey)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SessionKey)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SessionKey)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SessionKey)
$cgmapT :: (forall b. Data b => b -> b) -> SessionKey -> SessionKey
gmapT :: (forall b. Data b => b -> b) -> SessionKey -> SessionKey
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SessionKey -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SessionKey -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SessionKey -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SessionKey -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SessionKey -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> SessionKey -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SessionKey -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SessionKey -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SessionKey -> m SessionKey
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SessionKey -> m SessionKey
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SessionKey -> m SessionKey
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SessionKey -> m SessionKey
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SessionKey -> m SessionKey
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SessionKey -> m SessionKey
Data
, SessionKey -> SessionKey -> Bool
(SessionKey -> SessionKey -> Bool)
-> (SessionKey -> SessionKey -> Bool) -> Eq SessionKey
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SessionKey -> SessionKey -> Bool
== :: SessionKey -> SessionKey -> Bool
$c/= :: SessionKey -> SessionKey -> Bool
/= :: SessionKey -> SessionKey -> Bool
Eq
, (forall x. SessionKey -> Rep SessionKey x)
-> (forall x. Rep SessionKey x -> SessionKey) -> Generic SessionKey
forall x. Rep SessionKey x -> SessionKey
forall x. SessionKey -> Rep SessionKey x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SessionKey -> Rep SessionKey x
from :: forall x. SessionKey -> Rep SessionKey x
$cto :: forall x. Rep SessionKey x -> SessionKey
to :: forall x. Rep SessionKey x -> SessionKey
Generic
, Eq SessionKey
Eq SessionKey =>
(Int -> SessionKey -> Int)
-> (SessionKey -> Int) -> Hashable SessionKey
Int -> SessionKey -> Int
SessionKey -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> SessionKey -> Int
hashWithSalt :: Int -> SessionKey -> Int
$chash :: SessionKey -> Int
hash :: SessionKey -> Int
Hashable
, Semigroup SessionKey
SessionKey
Semigroup SessionKey =>
SessionKey
-> (SessionKey -> SessionKey -> SessionKey)
-> ([SessionKey] -> SessionKey)
-> Monoid SessionKey
[SessionKey] -> SessionKey
SessionKey -> SessionKey -> SessionKey
forall a.
Semigroup a =>
a -> (a -> a -> a) -> ([a] -> a) -> Monoid a
$cmempty :: SessionKey
mempty :: SessionKey
$cmappend :: SessionKey -> SessionKey -> SessionKey
mappend :: SessionKey -> SessionKey -> SessionKey
$cmconcat :: [SessionKey] -> SessionKey
mconcat :: [SessionKey] -> SessionKey
Monoid
, NonEmpty SessionKey -> SessionKey
SessionKey -> SessionKey -> SessionKey
(SessionKey -> SessionKey -> SessionKey)
-> (NonEmpty SessionKey -> SessionKey)
-> (forall b. Integral b => b -> SessionKey -> SessionKey)
-> Semigroup SessionKey
forall b. Integral b => b -> SessionKey -> SessionKey
forall a.
(a -> a -> a)
-> (NonEmpty a -> a)
-> (forall b. Integral b => b -> a -> a)
-> Semigroup a
$c<> :: SessionKey -> SessionKey -> SessionKey
<> :: SessionKey -> SessionKey -> SessionKey
$csconcat :: NonEmpty SessionKey -> SessionKey
sconcat :: NonEmpty SessionKey -> SessionKey
$cstimes :: forall b. Integral b => b -> SessionKey -> SessionKey
stimes :: forall b. Integral b => b -> SessionKey -> SessionKey
Semigroup
, Int -> SessionKey -> ShowS
[SessionKey] -> ShowS
SessionKey -> String
(Int -> SessionKey -> ShowS)
-> (SessionKey -> String)
-> ([SessionKey] -> ShowS)
-> Show SessionKey
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SessionKey -> ShowS
showsPrec :: Int -> SessionKey -> ShowS
$cshow :: SessionKey -> String
show :: SessionKey -> String
$cshowList :: [SessionKey] -> ShowS
showList :: [SessionKey] -> ShowS
Show
, Typeable
)
instance Wrapped SessionKey
instance Ord SessionKey where
compare :: SessionKey -> SessionKey -> Ordering
compare (SessionKey ByteString
b1) (SessionKey ByteString
b2) = ByteString -> ByteString -> Ordering
forall a. Ord a => a -> a -> Ordering
compare ByteString
b1 ByteString
b2
newtype Salt
= Salt
{ Salt -> ByteString
unSalt :: B.ByteString
}
deriving
( Eq Salt
Ord Salt
Monoid Salt
ByteArrayAccess Salt
(Eq Salt, Ord Salt, Monoid Salt, ByteArrayAccess Salt) =>
(forall p a. Int -> (Ptr p -> IO a) -> IO (a, Salt))
-> ByteArray Salt
forall ba.
(Eq ba, Ord ba, Monoid ba, ByteArrayAccess ba) =>
(forall p a. Int -> (Ptr p -> IO a) -> IO (a, ba)) -> ByteArray ba
forall p a. Int -> (Ptr p -> IO a) -> IO (a, Salt)
$callocRet :: forall p a. Int -> (Ptr p -> IO a) -> IO (a, Salt)
allocRet :: forall p a. Int -> (Ptr p -> IO a) -> IO (a, Salt)
ByteArray
, Salt -> Int
(Salt -> Int)
-> (forall p a. Salt -> (Ptr p -> IO a) -> IO a)
-> (forall p. Salt -> Ptr p -> IO ())
-> ByteArrayAccess Salt
forall p. Salt -> Ptr p -> IO ()
forall ba.
(ba -> Int)
-> (forall p a. ba -> (Ptr p -> IO a) -> IO a)
-> (forall p. ba -> Ptr p -> IO ())
-> ByteArrayAccess ba
forall p a. Salt -> (Ptr p -> IO a) -> IO a
$clength :: Salt -> Int
length :: Salt -> Int
$cwithByteArray :: forall p a. Salt -> (Ptr p -> IO a) -> IO a
withByteArray :: forall p a. Salt -> (Ptr p -> IO a) -> IO a
$ccopyByteArrayToPtr :: forall p. Salt -> Ptr p -> IO ()
copyByteArrayToPtr :: forall p. Salt -> Ptr p -> IO ()
ByteArrayAccess
, Typeable Salt
Typeable Salt =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Salt -> c Salt)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Salt)
-> (Salt -> Constr)
-> (Salt -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Salt))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Salt))
-> ((forall b. Data b => b -> b) -> Salt -> Salt)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Salt -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Salt -> r)
-> (forall u. (forall d. Data d => d -> u) -> Salt -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Salt -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Salt -> m Salt)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt -> m Salt)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt -> m Salt)
-> Data Salt
Salt -> Constr
Salt -> DataType
(forall b. Data b => b -> b) -> Salt -> Salt
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Salt -> u
forall u. (forall d. Data d => d -> u) -> Salt -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Salt -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Salt -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Salt -> m Salt
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt -> m Salt
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Salt
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Salt -> c Salt
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Salt)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Salt)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Salt -> c Salt
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Salt -> c Salt
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Salt
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Salt
$ctoConstr :: Salt -> Constr
toConstr :: Salt -> Constr
$cdataTypeOf :: Salt -> DataType
dataTypeOf :: Salt -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Salt)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Salt)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Salt)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Salt)
$cgmapT :: (forall b. Data b => b -> b) -> Salt -> Salt
gmapT :: (forall b. Data b => b -> b) -> Salt -> Salt
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Salt -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Salt -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Salt -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Salt -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Salt -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Salt -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Salt -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Salt -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Salt -> m Salt
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Salt -> m Salt
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt -> m Salt
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt -> m Salt
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt -> m Salt
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt -> m Salt
Data
, Salt -> Salt -> Bool
(Salt -> Salt -> Bool) -> (Salt -> Salt -> Bool) -> Eq Salt
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Salt -> Salt -> Bool
== :: Salt -> Salt -> Bool
$c/= :: Salt -> Salt -> Bool
/= :: Salt -> Salt -> Bool
Eq
, (forall x. Salt -> Rep Salt x)
-> (forall x. Rep Salt x -> Salt) -> Generic Salt
forall x. Rep Salt x -> Salt
forall x. Salt -> Rep Salt x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. Salt -> Rep Salt x
from :: forall x. Salt -> Rep Salt x
$cto :: forall x. Rep Salt x -> Salt
to :: forall x. Rep Salt x -> Salt
Generic
, Eq Salt
Eq Salt => (Int -> Salt -> Int) -> (Salt -> Int) -> Hashable Salt
Int -> Salt -> Int
Salt -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> Salt -> Int
hashWithSalt :: Int -> Salt -> Int
$chash :: Salt -> Int
hash :: Salt -> Int
Hashable
, Semigroup Salt
Salt
Semigroup Salt =>
Salt -> (Salt -> Salt -> Salt) -> ([Salt] -> Salt) -> Monoid Salt
[Salt] -> Salt
Salt -> Salt -> Salt
forall a.
Semigroup a =>
a -> (a -> a -> a) -> ([a] -> a) -> Monoid a
$cmempty :: Salt
mempty :: Salt
$cmappend :: Salt -> Salt -> Salt
mappend :: Salt -> Salt -> Salt
$cmconcat :: [Salt] -> Salt
mconcat :: [Salt] -> Salt
Monoid
, NonEmpty Salt -> Salt
Salt -> Salt -> Salt
(Salt -> Salt -> Salt)
-> (NonEmpty Salt -> Salt)
-> (forall b. Integral b => b -> Salt -> Salt)
-> Semigroup Salt
forall b. Integral b => b -> Salt -> Salt
forall a.
(a -> a -> a)
-> (NonEmpty a -> a)
-> (forall b. Integral b => b -> a -> a)
-> Semigroup a
$c<> :: Salt -> Salt -> Salt
<> :: Salt -> Salt -> Salt
$csconcat :: NonEmpty Salt -> Salt
sconcat :: NonEmpty Salt -> Salt
$cstimes :: forall b. Integral b => b -> Salt -> Salt
stimes :: forall b. Integral b => b -> Salt -> Salt
Semigroup
, Int -> Salt -> ShowS
[Salt] -> ShowS
Salt -> String
(Int -> Salt -> ShowS)
-> (Salt -> String) -> ([Salt] -> ShowS) -> Show Salt
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Salt -> ShowS
showsPrec :: Int -> Salt -> ShowS
$cshow :: Salt -> String
show :: Salt -> String
$cshowList :: [Salt] -> ShowS
showList :: [Salt] -> ShowS
Show
, Typeable
)
instance Wrapped Salt
instance Ord Salt where
compare :: Salt -> Salt -> Ordering
compare (Salt ByteString
b1) (Salt ByteString
b2) = ByteString -> ByteString -> Ordering
forall a. Ord a => a -> a -> Ordering
compare ByteString
b1 ByteString
b2
instance Pretty Salt where
pretty :: forall ann. Salt -> Doc ann
pretty = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (String -> Doc ann) -> (Salt -> String) -> Salt -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (String
"salt:" String -> ShowS
forall a. [a] -> [a] -> [a]
++) ShowS -> (Salt -> String) -> Salt -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> String
bsToHexUpper (ByteString -> String) -> (Salt -> ByteString) -> Salt -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped Salt -> Salt) -> Salt -> Unwrapped Salt
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> Salt
Unwrapped Salt -> Salt
Salt
instance A.ToJSON Salt where
toJSON :: Salt -> Value
toJSON = String -> Value
forall a. ToJSON a => a -> Value
A.toJSON (String -> Value) -> (Salt -> String) -> Salt -> Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> String
forall a. Show a => a -> String
show (ByteString -> String) -> (Salt -> ByteString) -> Salt -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped Salt -> Salt) -> Salt -> Unwrapped Salt
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> Salt
Unwrapped Salt -> Salt
Salt
newtype Salt8
= Salt8
{ Salt8 -> ByteString
unSalt8 :: B.ByteString
}
deriving
( Eq Salt8
Ord Salt8
Monoid Salt8
ByteArrayAccess Salt8
(Eq Salt8, Ord Salt8, Monoid Salt8, ByteArrayAccess Salt8) =>
(forall p a. Int -> (Ptr p -> IO a) -> IO (a, Salt8))
-> ByteArray Salt8
forall ba.
(Eq ba, Ord ba, Monoid ba, ByteArrayAccess ba) =>
(forall p a. Int -> (Ptr p -> IO a) -> IO (a, ba)) -> ByteArray ba
forall p a. Int -> (Ptr p -> IO a) -> IO (a, Salt8)
$callocRet :: forall p a. Int -> (Ptr p -> IO a) -> IO (a, Salt8)
allocRet :: forall p a. Int -> (Ptr p -> IO a) -> IO (a, Salt8)
ByteArray
, Salt8 -> Int
(Salt8 -> Int)
-> (forall p a. Salt8 -> (Ptr p -> IO a) -> IO a)
-> (forall p. Salt8 -> Ptr p -> IO ())
-> ByteArrayAccess Salt8
forall p. Salt8 -> Ptr p -> IO ()
forall ba.
(ba -> Int)
-> (forall p a. ba -> (Ptr p -> IO a) -> IO a)
-> (forall p. ba -> Ptr p -> IO ())
-> ByteArrayAccess ba
forall p a. Salt8 -> (Ptr p -> IO a) -> IO a
$clength :: Salt8 -> Int
length :: Salt8 -> Int
$cwithByteArray :: forall p a. Salt8 -> (Ptr p -> IO a) -> IO a
withByteArray :: forall p a. Salt8 -> (Ptr p -> IO a) -> IO a
$ccopyByteArrayToPtr :: forall p. Salt8 -> Ptr p -> IO ()
copyByteArrayToPtr :: forall p. Salt8 -> Ptr p -> IO ()
ByteArrayAccess
, Typeable Salt8
Typeable Salt8 =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Salt8 -> c Salt8)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Salt8)
-> (Salt8 -> Constr)
-> (Salt8 -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Salt8))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Salt8))
-> ((forall b. Data b => b -> b) -> Salt8 -> Salt8)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Salt8 -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Salt8 -> r)
-> (forall u. (forall d. Data d => d -> u) -> Salt8 -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Salt8 -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Salt8 -> m Salt8)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt8 -> m Salt8)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt8 -> m Salt8)
-> Data Salt8
Salt8 -> Constr
Salt8 -> DataType
(forall b. Data b => b -> b) -> Salt8 -> Salt8
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Salt8 -> u
forall u. (forall d. Data d => d -> u) -> Salt8 -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Salt8 -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Salt8 -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Salt8 -> m Salt8
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt8 -> m Salt8
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Salt8
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Salt8 -> c Salt8
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Salt8)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Salt8)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Salt8 -> c Salt8
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Salt8 -> c Salt8
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Salt8
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Salt8
$ctoConstr :: Salt8 -> Constr
toConstr :: Salt8 -> Constr
$cdataTypeOf :: Salt8 -> DataType
dataTypeOf :: Salt8 -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Salt8)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Salt8)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Salt8)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Salt8)
$cgmapT :: (forall b. Data b => b -> b) -> Salt8 -> Salt8
gmapT :: (forall b. Data b => b -> b) -> Salt8 -> Salt8
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Salt8 -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Salt8 -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Salt8 -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Salt8 -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Salt8 -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Salt8 -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Salt8 -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Salt8 -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Salt8 -> m Salt8
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Salt8 -> m Salt8
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt8 -> m Salt8
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt8 -> m Salt8
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt8 -> m Salt8
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt8 -> m Salt8
Data
, Salt8 -> Salt8 -> Bool
(Salt8 -> Salt8 -> Bool) -> (Salt8 -> Salt8 -> Bool) -> Eq Salt8
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Salt8 -> Salt8 -> Bool
== :: Salt8 -> Salt8 -> Bool
$c/= :: Salt8 -> Salt8 -> Bool
/= :: Salt8 -> Salt8 -> Bool
Eq
, (forall x. Salt8 -> Rep Salt8 x)
-> (forall x. Rep Salt8 x -> Salt8) -> Generic Salt8
forall x. Rep Salt8 x -> Salt8
forall x. Salt8 -> Rep Salt8 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. Salt8 -> Rep Salt8 x
from :: forall x. Salt8 -> Rep Salt8 x
$cto :: forall x. Rep Salt8 x -> Salt8
to :: forall x. Rep Salt8 x -> Salt8
Generic
, Eq Salt8
Eq Salt8 =>
(Int -> Salt8 -> Int) -> (Salt8 -> Int) -> Hashable Salt8
Int -> Salt8 -> Int
Salt8 -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> Salt8 -> Int
hashWithSalt :: Int -> Salt8 -> Int
$chash :: Salt8 -> Int
hash :: Salt8 -> Int
Hashable
, Semigroup Salt8
Salt8
Semigroup Salt8 =>
Salt8
-> (Salt8 -> Salt8 -> Salt8) -> ([Salt8] -> Salt8) -> Monoid Salt8
[Salt8] -> Salt8
Salt8 -> Salt8 -> Salt8
forall a.
Semigroup a =>
a -> (a -> a -> a) -> ([a] -> a) -> Monoid a
$cmempty :: Salt8
mempty :: Salt8
$cmappend :: Salt8 -> Salt8 -> Salt8
mappend :: Salt8 -> Salt8 -> Salt8
$cmconcat :: [Salt8] -> Salt8
mconcat :: [Salt8] -> Salt8
Monoid
, NonEmpty Salt8 -> Salt8
Salt8 -> Salt8 -> Salt8
(Salt8 -> Salt8 -> Salt8)
-> (NonEmpty Salt8 -> Salt8)
-> (forall b. Integral b => b -> Salt8 -> Salt8)
-> Semigroup Salt8
forall b. Integral b => b -> Salt8 -> Salt8
forall a.
(a -> a -> a)
-> (NonEmpty a -> a)
-> (forall b. Integral b => b -> a -> a)
-> Semigroup a
$c<> :: Salt8 -> Salt8 -> Salt8
<> :: Salt8 -> Salt8 -> Salt8
$csconcat :: NonEmpty Salt8 -> Salt8
sconcat :: NonEmpty Salt8 -> Salt8
$cstimes :: forall b. Integral b => b -> Salt8 -> Salt8
stimes :: forall b. Integral b => b -> Salt8 -> Salt8
Semigroup
, Int -> Salt8 -> ShowS
[Salt8] -> ShowS
Salt8 -> String
(Int -> Salt8 -> ShowS)
-> (Salt8 -> String) -> ([Salt8] -> ShowS) -> Show Salt8
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Salt8 -> ShowS
showsPrec :: Int -> Salt8 -> ShowS
$cshow :: Salt8 -> String
show :: Salt8 -> String
$cshowList :: [Salt8] -> ShowS
showList :: [Salt8] -> ShowS
Show
, Typeable
)
instance Wrapped Salt8
instance Ord Salt8 where
compare :: Salt8 -> Salt8 -> Ordering
compare (Salt8 ByteString
b1) (Salt8 ByteString
b2) = ByteString -> ByteString -> Ordering
forall a. Ord a => a -> a -> Ordering
compare ByteString
b1 ByteString
b2
instance Pretty Salt8 where
pretty :: forall ann. Salt8 -> Doc ann
pretty =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (String -> Doc ann) -> (Salt8 -> String) -> Salt8 -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (String
"salt8:" String -> ShowS
forall a. [a] -> [a] -> [a]
++) ShowS -> (Salt8 -> String) -> Salt8 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> String
bsToHexUpper (ByteString -> String) -> (Salt8 -> ByteString) -> Salt8 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped Salt8 -> Salt8) -> Salt8 -> Unwrapped Salt8
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> Salt8
Unwrapped Salt8 -> Salt8
Salt8
instance A.ToJSON Salt8 where
toJSON :: Salt8 -> Value
toJSON = String -> Value
forall a. ToJSON a => a -> Value
A.toJSON (String -> Value) -> (Salt8 -> String) -> Salt8 -> Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> String
forall a. Show a => a -> String
show (ByteString -> String) -> (Salt8 -> ByteString) -> Salt8 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped Salt8 -> Salt8) -> Salt8 -> Unwrapped Salt8
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> Salt8
Unwrapped Salt8 -> Salt8
Salt8
newtype Salt16
= Salt16
{ Salt16 -> ByteString
unSalt16 :: B.ByteString
}
deriving
( Eq Salt16
Ord Salt16
Monoid Salt16
ByteArrayAccess Salt16
(Eq Salt16, Ord Salt16, Monoid Salt16, ByteArrayAccess Salt16) =>
(forall p a. Int -> (Ptr p -> IO a) -> IO (a, Salt16))
-> ByteArray Salt16
forall ba.
(Eq ba, Ord ba, Monoid ba, ByteArrayAccess ba) =>
(forall p a. Int -> (Ptr p -> IO a) -> IO (a, ba)) -> ByteArray ba
forall p a. Int -> (Ptr p -> IO a) -> IO (a, Salt16)
$callocRet :: forall p a. Int -> (Ptr p -> IO a) -> IO (a, Salt16)
allocRet :: forall p a. Int -> (Ptr p -> IO a) -> IO (a, Salt16)
ByteArray
, Salt16 -> Int
(Salt16 -> Int)
-> (forall p a. Salt16 -> (Ptr p -> IO a) -> IO a)
-> (forall p. Salt16 -> Ptr p -> IO ())
-> ByteArrayAccess Salt16
forall p. Salt16 -> Ptr p -> IO ()
forall ba.
(ba -> Int)
-> (forall p a. ba -> (Ptr p -> IO a) -> IO a)
-> (forall p. ba -> Ptr p -> IO ())
-> ByteArrayAccess ba
forall p a. Salt16 -> (Ptr p -> IO a) -> IO a
$clength :: Salt16 -> Int
length :: Salt16 -> Int
$cwithByteArray :: forall p a. Salt16 -> (Ptr p -> IO a) -> IO a
withByteArray :: forall p a. Salt16 -> (Ptr p -> IO a) -> IO a
$ccopyByteArrayToPtr :: forall p. Salt16 -> Ptr p -> IO ()
copyByteArrayToPtr :: forall p. Salt16 -> Ptr p -> IO ()
ByteArrayAccess
, Typeable Salt16
Typeable Salt16 =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Salt16 -> c Salt16)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Salt16)
-> (Salt16 -> Constr)
-> (Salt16 -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Salt16))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Salt16))
-> ((forall b. Data b => b -> b) -> Salt16 -> Salt16)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Salt16 -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Salt16 -> r)
-> (forall u. (forall d. Data d => d -> u) -> Salt16 -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Salt16 -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Salt16 -> m Salt16)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt16 -> m Salt16)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt16 -> m Salt16)
-> Data Salt16
Salt16 -> Constr
Salt16 -> DataType
(forall b. Data b => b -> b) -> Salt16 -> Salt16
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Salt16 -> u
forall u. (forall d. Data d => d -> u) -> Salt16 -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Salt16 -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Salt16 -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Salt16 -> m Salt16
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt16 -> m Salt16
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Salt16
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Salt16 -> c Salt16
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Salt16)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Salt16)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Salt16 -> c Salt16
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Salt16 -> c Salt16
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Salt16
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Salt16
$ctoConstr :: Salt16 -> Constr
toConstr :: Salt16 -> Constr
$cdataTypeOf :: Salt16 -> DataType
dataTypeOf :: Salt16 -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Salt16)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Salt16)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Salt16)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Salt16)
$cgmapT :: (forall b. Data b => b -> b) -> Salt16 -> Salt16
gmapT :: (forall b. Data b => b -> b) -> Salt16 -> Salt16
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Salt16 -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Salt16 -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Salt16 -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Salt16 -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Salt16 -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Salt16 -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Salt16 -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Salt16 -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Salt16 -> m Salt16
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Salt16 -> m Salt16
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt16 -> m Salt16
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt16 -> m Salt16
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt16 -> m Salt16
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Salt16 -> m Salt16
Data
, Salt16 -> Salt16 -> Bool
(Salt16 -> Salt16 -> Bool)
-> (Salt16 -> Salt16 -> Bool) -> Eq Salt16
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Salt16 -> Salt16 -> Bool
== :: Salt16 -> Salt16 -> Bool
$c/= :: Salt16 -> Salt16 -> Bool
/= :: Salt16 -> Salt16 -> Bool
Eq
, (forall x. Salt16 -> Rep Salt16 x)
-> (forall x. Rep Salt16 x -> Salt16) -> Generic Salt16
forall x. Rep Salt16 x -> Salt16
forall x. Salt16 -> Rep Salt16 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. Salt16 -> Rep Salt16 x
from :: forall x. Salt16 -> Rep Salt16 x
$cto :: forall x. Rep Salt16 x -> Salt16
to :: forall x. Rep Salt16 x -> Salt16
Generic
, Eq Salt16
Eq Salt16 =>
(Int -> Salt16 -> Int) -> (Salt16 -> Int) -> Hashable Salt16
Int -> Salt16 -> Int
Salt16 -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> Salt16 -> Int
hashWithSalt :: Int -> Salt16 -> Int
$chash :: Salt16 -> Int
hash :: Salt16 -> Int
Hashable
, Semigroup Salt16
Salt16
Semigroup Salt16 =>
Salt16
-> (Salt16 -> Salt16 -> Salt16)
-> ([Salt16] -> Salt16)
-> Monoid Salt16
[Salt16] -> Salt16
Salt16 -> Salt16 -> Salt16
forall a.
Semigroup a =>
a -> (a -> a -> a) -> ([a] -> a) -> Monoid a
$cmempty :: Salt16
mempty :: Salt16
$cmappend :: Salt16 -> Salt16 -> Salt16
mappend :: Salt16 -> Salt16 -> Salt16
$cmconcat :: [Salt16] -> Salt16
mconcat :: [Salt16] -> Salt16
Monoid
, NonEmpty Salt16 -> Salt16
Salt16 -> Salt16 -> Salt16
(Salt16 -> Salt16 -> Salt16)
-> (NonEmpty Salt16 -> Salt16)
-> (forall b. Integral b => b -> Salt16 -> Salt16)
-> Semigroup Salt16
forall b. Integral b => b -> Salt16 -> Salt16
forall a.
(a -> a -> a)
-> (NonEmpty a -> a)
-> (forall b. Integral b => b -> a -> a)
-> Semigroup a
$c<> :: Salt16 -> Salt16 -> Salt16
<> :: Salt16 -> Salt16 -> Salt16
$csconcat :: NonEmpty Salt16 -> Salt16
sconcat :: NonEmpty Salt16 -> Salt16
$cstimes :: forall b. Integral b => b -> Salt16 -> Salt16
stimes :: forall b. Integral b => b -> Salt16 -> Salt16
Semigroup
, Int -> Salt16 -> ShowS
[Salt16] -> ShowS
Salt16 -> String
(Int -> Salt16 -> ShowS)
-> (Salt16 -> String) -> ([Salt16] -> ShowS) -> Show Salt16
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Salt16 -> ShowS
showsPrec :: Int -> Salt16 -> ShowS
$cshow :: Salt16 -> String
show :: Salt16 -> String
$cshowList :: [Salt16] -> ShowS
showList :: [Salt16] -> ShowS
Show
, Typeable
)
instance Wrapped Salt16
instance Ord Salt16 where
compare :: Salt16 -> Salt16 -> Ordering
compare (Salt16 ByteString
b1) (Salt16 ByteString
b2) = ByteString -> ByteString -> Ordering
forall a. Ord a => a -> a -> Ordering
compare ByteString
b1 ByteString
b2
instance Pretty Salt16 where
pretty :: forall ann. Salt16 -> Doc ann
pretty =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty
(String -> Doc ann) -> (Salt16 -> String) -> Salt16 -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (String
"salt16:" String -> ShowS
forall a. [a] -> [a] -> [a]
++)
ShowS -> (Salt16 -> String) -> Salt16 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> String
bsToHexUpper
(ByteString -> String)
-> (Salt16 -> ByteString) -> Salt16 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped Salt16 -> Salt16) -> Salt16 -> Unwrapped Salt16
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> Salt16
Unwrapped Salt16 -> Salt16
Salt16
instance A.ToJSON Salt16 where
toJSON :: Salt16 -> Value
toJSON = String -> Value
forall a. ToJSON a => a -> Value
A.toJSON (String -> Value) -> (Salt16 -> String) -> Salt16 -> Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> String
forall a. Show a => a -> String
show (ByteString -> String)
-> (Salt16 -> ByteString) -> Salt16 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped Salt16 -> Salt16) -> Salt16 -> Unwrapped Salt16
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> Salt16
Unwrapped Salt16 -> Salt16
Salt16
salt8FromSalt :: Salt -> Maybe Salt8
salt8FromSalt :: Salt -> Maybe Salt8
salt8FromSalt (Salt ByteString
bs)
| ByteString -> Int
B.length ByteString
bs Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== Int
8 = Salt8 -> Maybe Salt8
forall a. a -> Maybe a
Just (ByteString -> Salt8
Salt8 ByteString
bs)
| Bool
otherwise = Maybe Salt8
forall a. Maybe a
Nothing
salt16FromSalt :: Salt -> Maybe Salt16
salt16FromSalt :: Salt -> Maybe Salt16
salt16FromSalt (Salt ByteString
bs)
| ByteString -> Int
B.length ByteString
bs Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== Int
16 = Salt16 -> Maybe Salt16
forall a. a -> Maybe a
Just (ByteString -> Salt16
Salt16 ByteString
bs)
| Bool
otherwise = Maybe Salt16
forall a. Maybe a
Nothing
saltFromSalt8 :: Salt8 -> Salt
saltFromSalt8 :: Salt8 -> Salt
saltFromSalt8 (Salt8 ByteString
bs) = ByteString -> Salt
Salt ByteString
bs
saltFromSalt16 :: Salt16 -> Salt
saltFromSalt16 :: Salt16 -> Salt
saltFromSalt16 (Salt16 ByteString
bs) = ByteString -> Salt
Salt ByteString
bs
newtype IterationCount
= IterationCount
{ IterationCount -> Int
unIterationCount :: Int
}
deriving
( IterationCount
IterationCount -> IterationCount -> Bounded IterationCount
forall a. a -> a -> Bounded a
$cminBound :: IterationCount
minBound :: IterationCount
$cmaxBound :: IterationCount
maxBound :: IterationCount
Bounded
, Typeable IterationCount
Typeable IterationCount =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IterationCount -> c IterationCount)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IterationCount)
-> (IterationCount -> Constr)
-> (IterationCount -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IterationCount))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IterationCount))
-> ((forall b. Data b => b -> b)
-> IterationCount -> IterationCount)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IterationCount -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> IterationCount -> r)
-> (forall u.
(forall d. Data d => d -> u) -> IterationCount -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> IterationCount -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IterationCount -> m IterationCount)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IterationCount -> m IterationCount)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IterationCount -> m IterationCount)
-> Data IterationCount
IterationCount -> Constr
IterationCount -> DataType
(forall b. Data b => b -> b) -> IterationCount -> IterationCount
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> IterationCount -> u
forall u. (forall d. Data d => d -> u) -> IterationCount -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IterationCount -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> IterationCount -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IterationCount -> m IterationCount
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IterationCount -> m IterationCount
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IterationCount
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IterationCount -> c IterationCount
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IterationCount)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IterationCount)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IterationCount -> c IterationCount
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IterationCount -> c IterationCount
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IterationCount
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IterationCount
$ctoConstr :: IterationCount -> Constr
toConstr :: IterationCount -> Constr
$cdataTypeOf :: IterationCount -> DataType
dataTypeOf :: IterationCount -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IterationCount)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IterationCount)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IterationCount)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IterationCount)
$cgmapT :: (forall b. Data b => b -> b) -> IterationCount -> IterationCount
gmapT :: (forall b. Data b => b -> b) -> IterationCount -> IterationCount
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IterationCount -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IterationCount -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> IterationCount -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> IterationCount -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> IterationCount -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> IterationCount -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> IterationCount -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> IterationCount -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IterationCount -> m IterationCount
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IterationCount -> m IterationCount
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IterationCount -> m IterationCount
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IterationCount -> m IterationCount
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IterationCount -> m IterationCount
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IterationCount -> m IterationCount
Data
, Int -> IterationCount
IterationCount -> Int
IterationCount -> [IterationCount]
IterationCount -> IterationCount
IterationCount -> IterationCount -> [IterationCount]
IterationCount
-> IterationCount -> IterationCount -> [IterationCount]
(IterationCount -> IterationCount)
-> (IterationCount -> IterationCount)
-> (Int -> IterationCount)
-> (IterationCount -> Int)
-> (IterationCount -> [IterationCount])
-> (IterationCount -> IterationCount -> [IterationCount])
-> (IterationCount -> IterationCount -> [IterationCount])
-> (IterationCount
-> IterationCount -> IterationCount -> [IterationCount])
-> Enum IterationCount
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: IterationCount -> IterationCount
succ :: IterationCount -> IterationCount
$cpred :: IterationCount -> IterationCount
pred :: IterationCount -> IterationCount
$ctoEnum :: Int -> IterationCount
toEnum :: Int -> IterationCount
$cfromEnum :: IterationCount -> Int
fromEnum :: IterationCount -> Int
$cenumFrom :: IterationCount -> [IterationCount]
enumFrom :: IterationCount -> [IterationCount]
$cenumFromThen :: IterationCount -> IterationCount -> [IterationCount]
enumFromThen :: IterationCount -> IterationCount -> [IterationCount]
$cenumFromTo :: IterationCount -> IterationCount -> [IterationCount]
enumFromTo :: IterationCount -> IterationCount -> [IterationCount]
$cenumFromThenTo :: IterationCount
-> IterationCount -> IterationCount -> [IterationCount]
enumFromThenTo :: IterationCount
-> IterationCount -> IterationCount -> [IterationCount]
Enum
, IterationCount -> IterationCount -> Bool
(IterationCount -> IterationCount -> Bool)
-> (IterationCount -> IterationCount -> Bool) -> Eq IterationCount
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IterationCount -> IterationCount -> Bool
== :: IterationCount -> IterationCount -> Bool
$c/= :: IterationCount -> IterationCount -> Bool
/= :: IterationCount -> IterationCount -> Bool
Eq
, (forall x. IterationCount -> Rep IterationCount x)
-> (forall x. Rep IterationCount x -> IterationCount)
-> Generic IterationCount
forall x. Rep IterationCount x -> IterationCount
forall x. IterationCount -> Rep IterationCount x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. IterationCount -> Rep IterationCount x
from :: forall x. IterationCount -> Rep IterationCount x
$cto :: forall x. Rep IterationCount x -> IterationCount
to :: forall x. Rep IterationCount x -> IterationCount
Generic
, Eq IterationCount
Eq IterationCount =>
(Int -> IterationCount -> Int)
-> (IterationCount -> Int) -> Hashable IterationCount
Int -> IterationCount -> Int
IterationCount -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> IterationCount -> Int
hashWithSalt :: Int -> IterationCount -> Int
$chash :: IterationCount -> Int
hash :: IterationCount -> Int
Hashable
, Enum IterationCount
Real IterationCount
(Real IterationCount, Enum IterationCount) =>
(IterationCount -> IterationCount -> IterationCount)
-> (IterationCount -> IterationCount -> IterationCount)
-> (IterationCount -> IterationCount -> IterationCount)
-> (IterationCount -> IterationCount -> IterationCount)
-> (IterationCount
-> IterationCount -> (IterationCount, IterationCount))
-> (IterationCount
-> IterationCount -> (IterationCount, IterationCount))
-> (IterationCount -> Integer)
-> Integral IterationCount
IterationCount -> Integer
IterationCount
-> IterationCount -> (IterationCount, IterationCount)
IterationCount -> IterationCount -> IterationCount
forall a.
(Real a, Enum a) =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
$cquot :: IterationCount -> IterationCount -> IterationCount
quot :: IterationCount -> IterationCount -> IterationCount
$crem :: IterationCount -> IterationCount -> IterationCount
rem :: IterationCount -> IterationCount -> IterationCount
$cdiv :: IterationCount -> IterationCount -> IterationCount
div :: IterationCount -> IterationCount -> IterationCount
$cmod :: IterationCount -> IterationCount -> IterationCount
mod :: IterationCount -> IterationCount -> IterationCount
$cquotRem :: IterationCount
-> IterationCount -> (IterationCount, IterationCount)
quotRem :: IterationCount
-> IterationCount -> (IterationCount, IterationCount)
$cdivMod :: IterationCount
-> IterationCount -> (IterationCount, IterationCount)
divMod :: IterationCount
-> IterationCount -> (IterationCount, IterationCount)
$ctoInteger :: IterationCount -> Integer
toInteger :: IterationCount -> Integer
Integral
, Integer -> IterationCount
IterationCount -> IterationCount
IterationCount -> IterationCount -> IterationCount
(IterationCount -> IterationCount -> IterationCount)
-> (IterationCount -> IterationCount -> IterationCount)
-> (IterationCount -> IterationCount -> IterationCount)
-> (IterationCount -> IterationCount)
-> (IterationCount -> IterationCount)
-> (IterationCount -> IterationCount)
-> (Integer -> IterationCount)
-> Num IterationCount
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: IterationCount -> IterationCount -> IterationCount
+ :: IterationCount -> IterationCount -> IterationCount
$c- :: IterationCount -> IterationCount -> IterationCount
- :: IterationCount -> IterationCount -> IterationCount
$c* :: IterationCount -> IterationCount -> IterationCount
* :: IterationCount -> IterationCount -> IterationCount
$cnegate :: IterationCount -> IterationCount
negate :: IterationCount -> IterationCount
$cabs :: IterationCount -> IterationCount
abs :: IterationCount -> IterationCount
$csignum :: IterationCount -> IterationCount
signum :: IterationCount -> IterationCount
$cfromInteger :: Integer -> IterationCount
fromInteger :: Integer -> IterationCount
Num
, Eq IterationCount
Eq IterationCount =>
(IterationCount -> IterationCount -> Ordering)
-> (IterationCount -> IterationCount -> Bool)
-> (IterationCount -> IterationCount -> Bool)
-> (IterationCount -> IterationCount -> Bool)
-> (IterationCount -> IterationCount -> Bool)
-> (IterationCount -> IterationCount -> IterationCount)
-> (IterationCount -> IterationCount -> IterationCount)
-> Ord IterationCount
IterationCount -> IterationCount -> Bool
IterationCount -> IterationCount -> Ordering
IterationCount -> IterationCount -> IterationCount
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: IterationCount -> IterationCount -> Ordering
compare :: IterationCount -> IterationCount -> Ordering
$c< :: IterationCount -> IterationCount -> Bool
< :: IterationCount -> IterationCount -> Bool
$c<= :: IterationCount -> IterationCount -> Bool
<= :: IterationCount -> IterationCount -> Bool
$c> :: IterationCount -> IterationCount -> Bool
> :: IterationCount -> IterationCount -> Bool
$c>= :: IterationCount -> IterationCount -> Bool
>= :: IterationCount -> IterationCount -> Bool
$cmax :: IterationCount -> IterationCount -> IterationCount
max :: IterationCount -> IterationCount -> IterationCount
$cmin :: IterationCount -> IterationCount -> IterationCount
min :: IterationCount -> IterationCount -> IterationCount
Ord
, Num IterationCount
Ord IterationCount
(Num IterationCount, Ord IterationCount) =>
(IterationCount -> Rational) -> Real IterationCount
IterationCount -> Rational
forall a. (Num a, Ord a) => (a -> Rational) -> Real a
$ctoRational :: IterationCount -> Rational
toRational :: IterationCount -> Rational
Real
, Int -> IterationCount -> ShowS
[IterationCount] -> ShowS
IterationCount -> String
(Int -> IterationCount -> ShowS)
-> (IterationCount -> String)
-> ([IterationCount] -> ShowS)
-> Show IterationCount
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IterationCount -> ShowS
showsPrec :: Int -> IterationCount -> ShowS
$cshow :: IterationCount -> String
show :: IterationCount -> String
$cshowList :: [IterationCount] -> ShowS
showList :: [IterationCount] -> ShowS
Show
, Typeable
)
instance Wrapped IterationCount
instance Pretty IterationCount where
pretty :: forall ann. IterationCount -> Doc ann
pretty = Int -> Doc ann
forall ann. Int -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (Int -> Doc ann)
-> (IterationCount -> Int) -> IterationCount -> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Unwrapped IterationCount -> IterationCount)
-> IterationCount -> Unwrapped IterationCount
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op Int -> IterationCount
Unwrapped IterationCount -> IterationCount
IterationCount
$(ATH.deriveJSON ATH.defaultOptions ''IterationCount)
data S2K
= Simple HashAlgorithm
| Salted HashAlgorithm Salt8
| IteratedSalted HashAlgorithm Salt8 IterationCount
| Argon2 Salt16 Word8 Word8 Word8
| OtherS2K Word8 ByteString
deriving (Typeable S2K
Typeable S2K =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> S2K -> c S2K)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c S2K)
-> (S2K -> Constr)
-> (S2K -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c S2K))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c S2K))
-> ((forall b. Data b => b -> b) -> S2K -> S2K)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> S2K -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> S2K -> r)
-> (forall u. (forall d. Data d => d -> u) -> S2K -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> S2K -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> S2K -> m S2K)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> S2K -> m S2K)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> S2K -> m S2K)
-> Data S2K
S2K -> Constr
S2K -> DataType
(forall b. Data b => b -> b) -> S2K -> S2K
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> S2K -> u
forall u. (forall d. Data d => d -> u) -> S2K -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> S2K -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> S2K -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> S2K -> m S2K
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> S2K -> m S2K
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c S2K
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> S2K -> c S2K
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c S2K)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c S2K)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> S2K -> c S2K
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> S2K -> c S2K
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c S2K
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c S2K
$ctoConstr :: S2K -> Constr
toConstr :: S2K -> Constr
$cdataTypeOf :: S2K -> DataType
dataTypeOf :: S2K -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c S2K)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c S2K)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c S2K)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c S2K)
$cgmapT :: (forall b. Data b => b -> b) -> S2K -> S2K
gmapT :: (forall b. Data b => b -> b) -> S2K -> S2K
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> S2K -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> S2K -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> S2K -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> S2K -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> S2K -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> S2K -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> S2K -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> S2K -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> S2K -> m S2K
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> S2K -> m S2K
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> S2K -> m S2K
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> S2K -> m S2K
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> S2K -> m S2K
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> S2K -> m S2K
Data, S2K -> S2K -> Bool
(S2K -> S2K -> Bool) -> (S2K -> S2K -> Bool) -> Eq S2K
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: S2K -> S2K -> Bool
== :: S2K -> S2K -> Bool
$c/= :: S2K -> S2K -> Bool
/= :: S2K -> S2K -> Bool
Eq, (forall x. S2K -> Rep S2K x)
-> (forall x. Rep S2K x -> S2K) -> Generic S2K
forall x. Rep S2K x -> S2K
forall x. S2K -> Rep S2K x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. S2K -> Rep S2K x
from :: forall x. S2K -> Rep S2K x
$cto :: forall x. Rep S2K x -> S2K
to :: forall x. Rep S2K x -> S2K
Generic, Int -> S2K -> ShowS
[S2K] -> ShowS
S2K -> String
(Int -> S2K -> ShowS)
-> (S2K -> String) -> ([S2K] -> ShowS) -> Show S2K
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> S2K -> ShowS
showsPrec :: Int -> S2K -> ShowS
$cshow :: S2K -> String
show :: S2K -> String
$cshowList :: [S2K] -> ShowS
showList :: [S2K] -> ShowS
Show, Typeable)
instance Hashable S2K
instance Ord S2K where
compare :: S2K -> S2K -> Ordering
compare (Simple HashAlgorithm
ha1) (Simple HashAlgorithm
ha2) = HashAlgorithm -> HashAlgorithm -> Ordering
forall a. Ord a => a -> a -> Ordering
compare HashAlgorithm
ha1 HashAlgorithm
ha2
compare (Salted HashAlgorithm
ha1 Salt8
s1) (Salted HashAlgorithm
ha2 Salt8
s2) = HashAlgorithm -> HashAlgorithm -> Ordering
forall a. Ord a => a -> a -> Ordering
compare HashAlgorithm
ha1 HashAlgorithm
ha2 Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> Salt8 -> Salt8 -> Ordering
forall a. Ord a => a -> a -> Ordering
compare Salt8
s1 Salt8
s2
compare (IteratedSalted HashAlgorithm
ha1 Salt8
s1 IterationCount
ic1) (IteratedSalted HashAlgorithm
ha2 Salt8
s2 IterationCount
ic2) =
HashAlgorithm -> HashAlgorithm -> Ordering
forall a. Ord a => a -> a -> Ordering
compare HashAlgorithm
ha1 HashAlgorithm
ha2 Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> Salt8 -> Salt8 -> Ordering
forall a. Ord a => a -> a -> Ordering
compare Salt8
s1 Salt8
s2 Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> IterationCount -> IterationCount -> Ordering
forall a. Ord a => a -> a -> Ordering
compare IterationCount
ic1 IterationCount
ic2
compare (Argon2 Salt16
salt1 Word8
t1 Word8
p1 Word8
em1) (Argon2 Salt16
salt2 Word8
t2 Word8
p2 Word8
em2) =
Salt16 -> Salt16 -> Ordering
forall a. Ord a => a -> a -> Ordering
compare Salt16
salt1 Salt16
salt2
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> Word8 -> Word8 -> Ordering
forall a. Ord a => a -> a -> Ordering
compare Word8
t1 Word8
t2
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> Word8 -> Word8 -> Ordering
forall a. Ord a => a -> a -> Ordering
compare Word8
p1 Word8
p2
Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> Word8 -> Word8 -> Ordering
forall a. Ord a => a -> a -> Ordering
compare Word8
em1 Word8
em2
compare (OtherS2K Word8
t1 ByteString
bs1) (OtherS2K Word8
t2 ByteString
bs2) = Word8 -> Word8 -> Ordering
forall a. Ord a => a -> a -> Ordering
compare Word8
t1 Word8
t2 Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> ByteString -> ByteString -> Ordering
forall a. Ord a => a -> a -> Ordering
compare ByteString
bs1 ByteString
bs2
compare Simple {} Salted {} = Ordering
LT
compare Simple {} IteratedSalted {} = Ordering
LT
compare Simple {} Argon2 {} = Ordering
LT
compare Simple {} OtherS2K {} = Ordering
LT
compare Salted {} Simple {} = Ordering
GT
compare Salted {} IteratedSalted {} = Ordering
LT
compare Salted {} Argon2 {} = Ordering
LT
compare Salted {} OtherS2K {} = Ordering
LT
compare IteratedSalted {} Simple {} = Ordering
GT
compare IteratedSalted {} Salted {} = Ordering
GT
compare IteratedSalted {} Argon2 {} = Ordering
LT
compare IteratedSalted {} OtherS2K {} = Ordering
LT
compare Argon2 {} Simple {} = Ordering
GT
compare Argon2 {} Salted {} = Ordering
GT
compare Argon2 {} IteratedSalted {} = Ordering
GT
compare Argon2 {} OtherS2K {} = Ordering
LT
compare OtherS2K {} S2K
_ = Ordering
GT
instance Pretty S2K where
pretty :: forall ann. S2K -> Doc ann
pretty (Simple HashAlgorithm
ha) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"simple S2K," Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> HashAlgorithm -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. HashAlgorithm -> Doc ann
pretty HashAlgorithm
ha
pretty (Salted HashAlgorithm
ha Salt8
salt) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"salted S2K," Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> HashAlgorithm -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. HashAlgorithm -> Doc ann
pretty HashAlgorithm
ha Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Salt8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. Salt8 -> Doc ann
pretty Salt8
salt
pretty (IteratedSalted HashAlgorithm
ha Salt8
salt IterationCount
icount) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"iterated-salted S2K,"
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> HashAlgorithm -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. HashAlgorithm -> Doc ann
pretty HashAlgorithm
ha
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Salt8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. Salt8 -> Doc ann
pretty Salt8
salt
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> IterationCount -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. IterationCount -> Doc ann
pretty IterationCount
icount
pretty (Argon2 Salt16
salt Word8
t Word8
p Word8
em) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"Argon2 S2K,"
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Salt16 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. Salt16 -> Doc ann
pretty Salt16
salt
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
t
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
p
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
em
pretty (OtherS2K Word8
t ByteString
bs) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"unknown S2K type"
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
t
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (ByteString -> String
bsToHexUpper (ByteString -> ByteString
BL.toStrict ByteString
bs))
instance A.ToJSON S2K where
toJSON :: S2K -> Value
toJSON (Simple HashAlgorithm
ha) = HashAlgorithm -> Value
forall a. ToJSON a => a -> Value
A.toJSON HashAlgorithm
ha
toJSON (Salted HashAlgorithm
ha Salt8
salt) = (HashAlgorithm, Salt8) -> Value
forall a. ToJSON a => a -> Value
A.toJSON (HashAlgorithm
ha, Salt8
salt)
toJSON (IteratedSalted HashAlgorithm
ha Salt8
salt IterationCount
icount) = (HashAlgorithm, Salt8, IterationCount) -> Value
forall a. ToJSON a => a -> Value
A.toJSON (HashAlgorithm
ha, Salt8
salt, IterationCount
icount)
toJSON (Argon2 Salt16
salt Word8
t Word8
p Word8
em) = (Salt16, Word8, Word8, Word8) -> Value
forall a. ToJSON a => a -> Value
A.toJSON (Salt16
salt, Word8
t, Word8
p, Word8
em)
toJSON (OtherS2K Word8
t ByteString
bs) = (Word8, [Word8]) -> Value
forall a. ToJSON a => a -> Value
A.toJSON (Word8
t, ByteString -> [Word8]
BL.unpack ByteString
bs)
data ImageFormat
= JPEG
| OtherImage Word8
deriving (Typeable ImageFormat
Typeable ImageFormat =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ImageFormat -> c ImageFormat)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ImageFormat)
-> (ImageFormat -> Constr)
-> (ImageFormat -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ImageFormat))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ImageFormat))
-> ((forall b. Data b => b -> b) -> ImageFormat -> ImageFormat)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ImageFormat -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ImageFormat -> r)
-> (forall u. (forall d. Data d => d -> u) -> ImageFormat -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> ImageFormat -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ImageFormat -> m ImageFormat)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageFormat -> m ImageFormat)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageFormat -> m ImageFormat)
-> Data ImageFormat
ImageFormat -> Constr
ImageFormat -> DataType
(forall b. Data b => b -> b) -> ImageFormat -> ImageFormat
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ImageFormat -> u
forall u. (forall d. Data d => d -> u) -> ImageFormat -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ImageFormat -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ImageFormat -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ImageFormat -> m ImageFormat
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageFormat -> m ImageFormat
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ImageFormat
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ImageFormat -> c ImageFormat
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ImageFormat)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ImageFormat)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ImageFormat -> c ImageFormat
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ImageFormat -> c ImageFormat
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ImageFormat
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ImageFormat
$ctoConstr :: ImageFormat -> Constr
toConstr :: ImageFormat -> Constr
$cdataTypeOf :: ImageFormat -> DataType
dataTypeOf :: ImageFormat -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ImageFormat)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ImageFormat)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ImageFormat)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ImageFormat)
$cgmapT :: (forall b. Data b => b -> b) -> ImageFormat -> ImageFormat
gmapT :: (forall b. Data b => b -> b) -> ImageFormat -> ImageFormat
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ImageFormat -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ImageFormat -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ImageFormat -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ImageFormat -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ImageFormat -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> ImageFormat -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ImageFormat -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ImageFormat -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ImageFormat -> m ImageFormat
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ImageFormat -> m ImageFormat
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageFormat -> m ImageFormat
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageFormat -> m ImageFormat
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageFormat -> m ImageFormat
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageFormat -> m ImageFormat
Data, (forall x. ImageFormat -> Rep ImageFormat x)
-> (forall x. Rep ImageFormat x -> ImageFormat)
-> Generic ImageFormat
forall x. Rep ImageFormat x -> ImageFormat
forall x. ImageFormat -> Rep ImageFormat x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. ImageFormat -> Rep ImageFormat x
from :: forall x. ImageFormat -> Rep ImageFormat x
$cto :: forall x. Rep ImageFormat x -> ImageFormat
to :: forall x. Rep ImageFormat x -> ImageFormat
Generic, Int -> ImageFormat -> ShowS
[ImageFormat] -> ShowS
ImageFormat -> String
(Int -> ImageFormat -> ShowS)
-> (ImageFormat -> String)
-> ([ImageFormat] -> ShowS)
-> Show ImageFormat
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ImageFormat -> ShowS
showsPrec :: Int -> ImageFormat -> ShowS
$cshow :: ImageFormat -> String
show :: ImageFormat -> String
$cshowList :: [ImageFormat] -> ShowS
showList :: [ImageFormat] -> ShowS
Show, Typeable)
instance Eq ImageFormat where
== :: ImageFormat -> ImageFormat -> Bool
(==) ImageFormat
a ImageFormat
b = ImageFormat -> Word8
forall a. FutureVal a => a -> Word8
fromFVal ImageFormat
a Word8 -> Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== ImageFormat -> Word8
forall a. FutureVal a => a -> Word8
fromFVal ImageFormat
b
instance Ord ImageFormat where
compare :: ImageFormat -> ImageFormat -> Ordering
compare = (ImageFormat -> Word8) -> ImageFormat -> ImageFormat -> Ordering
forall a b. Ord a => (b -> a) -> b -> b -> Ordering
comparing ImageFormat -> Word8
forall a. FutureVal a => a -> Word8
fromFVal
instance FutureVal ImageFormat where
fromFVal :: ImageFormat -> Word8
fromFVal ImageFormat
JPEG = Word8
1
fromFVal (OtherImage Word8
o) = Word8
o
toFVal :: Word8 -> ImageFormat
toFVal Word8
1 = ImageFormat
JPEG
toFVal Word8
o = Word8 -> ImageFormat
OtherImage Word8
o
instance Hashable ImageFormat
instance Pretty ImageFormat where
pretty :: forall ann. ImageFormat -> Doc ann
pretty ImageFormat
JPEG = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"JPEG"
pretty (OtherImage Word8
o) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"unknown image format" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
o
$(ATH.deriveJSON ATH.defaultOptions ''ImageFormat)
newtype
= ImageHV1 ImageFormat
deriving (Typeable ImageHeader
Typeable ImageHeader =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ImageHeader -> c ImageHeader)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ImageHeader)
-> (ImageHeader -> Constr)
-> (ImageHeader -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ImageHeader))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ImageHeader))
-> ((forall b. Data b => b -> b) -> ImageHeader -> ImageHeader)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ImageHeader -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ImageHeader -> r)
-> (forall u. (forall d. Data d => d -> u) -> ImageHeader -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> ImageHeader -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ImageHeader -> m ImageHeader)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageHeader -> m ImageHeader)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageHeader -> m ImageHeader)
-> Data ImageHeader
ImageHeader -> Constr
ImageHeader -> DataType
(forall b. Data b => b -> b) -> ImageHeader -> ImageHeader
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ImageHeader -> u
forall u. (forall d. Data d => d -> u) -> ImageHeader -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ImageHeader -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ImageHeader -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ImageHeader -> m ImageHeader
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageHeader -> m ImageHeader
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ImageHeader
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ImageHeader -> c ImageHeader
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ImageHeader)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ImageHeader)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ImageHeader -> c ImageHeader
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ImageHeader -> c ImageHeader
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ImageHeader
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ImageHeader
$ctoConstr :: ImageHeader -> Constr
toConstr :: ImageHeader -> Constr
$cdataTypeOf :: ImageHeader -> DataType
dataTypeOf :: ImageHeader -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ImageHeader)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ImageHeader)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ImageHeader)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ImageHeader)
$cgmapT :: (forall b. Data b => b -> b) -> ImageHeader -> ImageHeader
gmapT :: (forall b. Data b => b -> b) -> ImageHeader -> ImageHeader
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ImageHeader -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ImageHeader -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ImageHeader -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ImageHeader -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ImageHeader -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> ImageHeader -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ImageHeader -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ImageHeader -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ImageHeader -> m ImageHeader
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ImageHeader -> m ImageHeader
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageHeader -> m ImageHeader
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageHeader -> m ImageHeader
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageHeader -> m ImageHeader
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ImageHeader -> m ImageHeader
Data, ImageHeader -> ImageHeader -> Bool
(ImageHeader -> ImageHeader -> Bool)
-> (ImageHeader -> ImageHeader -> Bool) -> Eq ImageHeader
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ImageHeader -> ImageHeader -> Bool
== :: ImageHeader -> ImageHeader -> Bool
$c/= :: ImageHeader -> ImageHeader -> Bool
/= :: ImageHeader -> ImageHeader -> Bool
Eq, (forall x. ImageHeader -> Rep ImageHeader x)
-> (forall x. Rep ImageHeader x -> ImageHeader)
-> Generic ImageHeader
forall x. Rep ImageHeader x -> ImageHeader
forall x. ImageHeader -> Rep ImageHeader x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. ImageHeader -> Rep ImageHeader x
from :: forall x. ImageHeader -> Rep ImageHeader x
$cto :: forall x. Rep ImageHeader x -> ImageHeader
to :: forall x. Rep ImageHeader x -> ImageHeader
Generic, Int -> ImageHeader -> ShowS
[ImageHeader] -> ShowS
ImageHeader -> String
(Int -> ImageHeader -> ShowS)
-> (ImageHeader -> String)
-> ([ImageHeader] -> ShowS)
-> Show ImageHeader
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ImageHeader -> ShowS
showsPrec :: Int -> ImageHeader -> ShowS
$cshow :: ImageHeader -> String
show :: ImageHeader -> String
$cshowList :: [ImageHeader] -> ShowS
showList :: [ImageHeader] -> ShowS
Show, Typeable)
instance Ord ImageHeader where
compare :: ImageHeader -> ImageHeader -> Ordering
compare (ImageHV1 ImageFormat
a) (ImageHV1 ImageFormat
b) = ImageFormat -> ImageFormat -> Ordering
forall a. Ord a => a -> a -> Ordering
compare ImageFormat
a ImageFormat
b
instance Hashable ImageHeader
instance Pretty ImageHeader where
pretty :: forall ann. ImageHeader -> Doc ann
pretty (ImageHV1 ImageFormat
f) = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"imghdr v1" Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> ImageFormat -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. ImageFormat -> Doc ann
pretty ImageFormat
f
$(ATH.deriveJSON ATH.defaultOptions ''ImageHeader)
data UserAttrSubPacket
= ImageAttribute ImageHeader ImageData
| OtherUASub Word8 ByteString
deriving (Typeable UserAttrSubPacket
Typeable UserAttrSubPacket =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> UserAttrSubPacket
-> c UserAttrSubPacket)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UserAttrSubPacket)
-> (UserAttrSubPacket -> Constr)
-> (UserAttrSubPacket -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c UserAttrSubPacket))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c UserAttrSubPacket))
-> ((forall b. Data b => b -> b)
-> UserAttrSubPacket -> UserAttrSubPacket)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> UserAttrSubPacket -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> UserAttrSubPacket -> r)
-> (forall u.
(forall d. Data d => d -> u) -> UserAttrSubPacket -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> UserAttrSubPacket -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> UserAttrSubPacket -> m UserAttrSubPacket)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UserAttrSubPacket -> m UserAttrSubPacket)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UserAttrSubPacket -> m UserAttrSubPacket)
-> Data UserAttrSubPacket
UserAttrSubPacket -> Constr
UserAttrSubPacket -> DataType
(forall b. Data b => b -> b)
-> UserAttrSubPacket -> UserAttrSubPacket
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> UserAttrSubPacket -> u
forall u. (forall d. Data d => d -> u) -> UserAttrSubPacket -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> UserAttrSubPacket -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> UserAttrSubPacket -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> UserAttrSubPacket -> m UserAttrSubPacket
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UserAttrSubPacket -> m UserAttrSubPacket
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UserAttrSubPacket
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> UserAttrSubPacket -> c UserAttrSubPacket
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c UserAttrSubPacket)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c UserAttrSubPacket)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> UserAttrSubPacket -> c UserAttrSubPacket
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> UserAttrSubPacket -> c UserAttrSubPacket
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UserAttrSubPacket
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UserAttrSubPacket
$ctoConstr :: UserAttrSubPacket -> Constr
toConstr :: UserAttrSubPacket -> Constr
$cdataTypeOf :: UserAttrSubPacket -> DataType
dataTypeOf :: UserAttrSubPacket -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c UserAttrSubPacket)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c UserAttrSubPacket)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c UserAttrSubPacket)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c UserAttrSubPacket)
$cgmapT :: (forall b. Data b => b -> b)
-> UserAttrSubPacket -> UserAttrSubPacket
gmapT :: (forall b. Data b => b -> b)
-> UserAttrSubPacket -> UserAttrSubPacket
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> UserAttrSubPacket -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> UserAttrSubPacket -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> UserAttrSubPacket -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> UserAttrSubPacket -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> UserAttrSubPacket -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> UserAttrSubPacket -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> UserAttrSubPacket -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> UserAttrSubPacket -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> UserAttrSubPacket -> m UserAttrSubPacket
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> UserAttrSubPacket -> m UserAttrSubPacket
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UserAttrSubPacket -> m UserAttrSubPacket
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UserAttrSubPacket -> m UserAttrSubPacket
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UserAttrSubPacket -> m UserAttrSubPacket
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UserAttrSubPacket -> m UserAttrSubPacket
Data, UserAttrSubPacket -> UserAttrSubPacket -> Bool
(UserAttrSubPacket -> UserAttrSubPacket -> Bool)
-> (UserAttrSubPacket -> UserAttrSubPacket -> Bool)
-> Eq UserAttrSubPacket
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UserAttrSubPacket -> UserAttrSubPacket -> Bool
== :: UserAttrSubPacket -> UserAttrSubPacket -> Bool
$c/= :: UserAttrSubPacket -> UserAttrSubPacket -> Bool
/= :: UserAttrSubPacket -> UserAttrSubPacket -> Bool
Eq, (forall x. UserAttrSubPacket -> Rep UserAttrSubPacket x)
-> (forall x. Rep UserAttrSubPacket x -> UserAttrSubPacket)
-> Generic UserAttrSubPacket
forall x. Rep UserAttrSubPacket x -> UserAttrSubPacket
forall x. UserAttrSubPacket -> Rep UserAttrSubPacket x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. UserAttrSubPacket -> Rep UserAttrSubPacket x
from :: forall x. UserAttrSubPacket -> Rep UserAttrSubPacket x
$cto :: forall x. Rep UserAttrSubPacket x -> UserAttrSubPacket
to :: forall x. Rep UserAttrSubPacket x -> UserAttrSubPacket
Generic, Int -> UserAttrSubPacket -> ShowS
[UserAttrSubPacket] -> ShowS
UserAttrSubPacket -> String
(Int -> UserAttrSubPacket -> ShowS)
-> (UserAttrSubPacket -> String)
-> ([UserAttrSubPacket] -> ShowS)
-> Show UserAttrSubPacket
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UserAttrSubPacket -> ShowS
showsPrec :: Int -> UserAttrSubPacket -> ShowS
$cshow :: UserAttrSubPacket -> String
show :: UserAttrSubPacket -> String
$cshowList :: [UserAttrSubPacket] -> ShowS
showList :: [UserAttrSubPacket] -> ShowS
Show, Typeable)
instance Hashable UserAttrSubPacket
instance Ord UserAttrSubPacket where
compare :: UserAttrSubPacket -> UserAttrSubPacket -> Ordering
compare (ImageAttribute ImageHeader
h1 ImageData
d1) (ImageAttribute ImageHeader
h2 ImageData
d2) =
ImageHeader -> ImageHeader -> Ordering
forall a. Ord a => a -> a -> Ordering
compare ImageHeader
h1 ImageHeader
h2 Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> ImageData -> ImageData -> Ordering
forall a. Ord a => a -> a -> Ordering
compare ImageData
d1 ImageData
d2
compare (ImageAttribute ImageHeader
_ ImageData
_) (OtherUASub Word8
_ ByteString
_) = Ordering
LT
compare (OtherUASub Word8
_ ByteString
_) (ImageAttribute ImageHeader
_ ImageData
_) = Ordering
GT
compare (OtherUASub Word8
t1 ByteString
b1) (OtherUASub Word8
t2 ByteString
b2) = Word8 -> Word8 -> Ordering
forall a. Ord a => a -> a -> Ordering
compare Word8
t1 Word8
t2 Ordering -> Ordering -> Ordering
forall a. Semigroup a => a -> a -> a
<> ByteString -> ByteString -> Ordering
forall a. Ord a => a -> a -> Ordering
compare ByteString
b1 ByteString
b2
instance Pretty UserAttrSubPacket where
pretty :: forall ann. UserAttrSubPacket -> Doc ann
pretty (ImageAttribute ImageHeader
ih ImageData
d) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"image-attribute"
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> ImageHeader -> Doc ann
forall a ann. Pretty a => a -> Doc ann
forall ann. ImageHeader -> Doc ann
pretty ImageHeader
ih
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> [Word8] -> Doc ann
forall ann. [Word8] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (ByteString -> [Word8]
BL.unpack ((Unwrapped ImageData -> ImageData)
-> ImageData -> Unwrapped ImageData
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> ImageData
Unwrapped ImageData -> ImageData
ImageData ImageData
d))
pretty (OtherUASub Word8
t ByteString
bs) =
String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"unknown attribute type"
Doc ann -> Doc ann -> Doc ann
forall a. Semigroup a => a -> a -> a
<> Word8 -> Doc ann
forall ann. Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
t
Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> [Word8] -> Doc ann
forall ann. [Word8] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (ByteString -> [Word8]
BL.unpack ByteString
bs)
instance A.ToJSON UserAttrSubPacket where
toJSON :: UserAttrSubPacket -> Value
toJSON (ImageAttribute ImageHeader
ih ImageData
d) = (ImageHeader, [Word8]) -> Value
forall a. ToJSON a => a -> Value
A.toJSON (ImageHeader
ih, ByteString -> [Word8]
BL.unpack ((Unwrapped ImageData -> ImageData)
-> ImageData -> Unwrapped ImageData
forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op ByteString -> ImageData
Unwrapped ImageData -> ImageData
ImageData ImageData
d))
toJSON (OtherUASub Word8
t ByteString
bs) = (Word8, [Word8]) -> Value
forall a. ToJSON a => a -> Value
A.toJSON (Word8
t, ByteString -> [Word8]
BL.unpack ByteString
bs)
data ECCCurve
= NISTP256
| NISTP384
| NISTP521
| Curve25519
| Curve448
deriving (Typeable ECCCurve
Typeable ECCCurve =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ECCCurve -> c ECCCurve)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ECCCurve)
-> (ECCCurve -> Constr)
-> (ECCCurve -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ECCCurve))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ECCCurve))
-> ((forall b. Data b => b -> b) -> ECCCurve -> ECCCurve)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ECCCurve -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ECCCurve -> r)
-> (forall u. (forall d. Data d => d -> u) -> ECCCurve -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> ECCCurve -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ECCCurve -> m ECCCurve)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ECCCurve -> m ECCCurve)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ECCCurve -> m ECCCurve)
-> Data ECCCurve
ECCCurve -> Constr
ECCCurve -> DataType
(forall b. Data b => b -> b) -> ECCCurve -> ECCCurve
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ECCCurve -> u
forall u. (forall d. Data d => d -> u) -> ECCCurve -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ECCCurve -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ECCCurve -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ECCCurve -> m ECCCurve
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ECCCurve -> m ECCCurve
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ECCCurve
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ECCCurve -> c ECCCurve
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ECCCurve)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ECCCurve)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ECCCurve -> c ECCCurve
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ECCCurve -> c ECCCurve
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ECCCurve
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ECCCurve
$ctoConstr :: ECCCurve -> Constr
toConstr :: ECCCurve -> Constr
$cdataTypeOf :: ECCCurve -> DataType
dataTypeOf :: ECCCurve -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ECCCurve)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ECCCurve)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ECCCurve)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ECCCurve)
$cgmapT :: (forall b. Data b => b -> b) -> ECCCurve -> ECCCurve
gmapT :: (forall b. Data b => b -> b) -> ECCCurve -> ECCCurve
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ECCCurve -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ECCCurve -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ECCCurve -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ECCCurve -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ECCCurve -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> ECCCurve -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ECCCurve -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ECCCurve -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ECCCurve -> m ECCCurve
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ECCCurve -> m ECCCurve
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ECCCurve -> m ECCCurve
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ECCCurve -> m ECCCurve
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ECCCurve -> m ECCCurve
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ECCCurve -> m ECCCurve
Data, ECCCurve -> ECCCurve -> Bool
(ECCCurve -> ECCCurve -> Bool)
-> (ECCCurve -> ECCCurve -> Bool) -> Eq ECCCurve
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ECCCurve -> ECCCurve -> Bool
== :: ECCCurve -> ECCCurve -> Bool
$c/= :: ECCCurve -> ECCCurve -> Bool
/= :: ECCCurve -> ECCCurve -> Bool
Eq, (forall x. ECCCurve -> Rep ECCCurve x)
-> (forall x. Rep ECCCurve x -> ECCCurve) -> Generic ECCCurve
forall x. Rep ECCCurve x -> ECCCurve
forall x. ECCCurve -> Rep ECCCurve x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. ECCCurve -> Rep ECCCurve x
from :: forall x. ECCCurve -> Rep ECCCurve x
$cto :: forall x. Rep ECCCurve x -> ECCCurve
to :: forall x. Rep ECCCurve x -> ECCCurve
Generic, Eq ECCCurve
Eq ECCCurve =>
(ECCCurve -> ECCCurve -> Ordering)
-> (ECCCurve -> ECCCurve -> Bool)
-> (ECCCurve -> ECCCurve -> Bool)
-> (ECCCurve -> ECCCurve -> Bool)
-> (ECCCurve -> ECCCurve -> Bool)
-> (ECCCurve -> ECCCurve -> ECCCurve)
-> (ECCCurve -> ECCCurve -> ECCCurve)
-> Ord ECCCurve
ECCCurve -> ECCCurve -> Bool
ECCCurve -> ECCCurve -> Ordering
ECCCurve -> ECCCurve -> ECCCurve
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: ECCCurve -> ECCCurve -> Ordering
compare :: ECCCurve -> ECCCurve -> Ordering
$c< :: ECCCurve -> ECCCurve -> Bool
< :: ECCCurve -> ECCCurve -> Bool
$c<= :: ECCCurve -> ECCCurve -> Bool
<= :: ECCCurve -> ECCCurve -> Bool
$c> :: ECCCurve -> ECCCurve -> Bool
> :: ECCCurve -> ECCCurve -> Bool
$c>= :: ECCCurve -> ECCCurve -> Bool
>= :: ECCCurve -> ECCCurve -> Bool
$cmax :: ECCCurve -> ECCCurve -> ECCCurve
max :: ECCCurve -> ECCCurve -> ECCCurve
$cmin :: ECCCurve -> ECCCurve -> ECCCurve
min :: ECCCurve -> ECCCurve -> ECCCurve
Ord, Int -> ECCCurve -> ShowS
[ECCCurve] -> ShowS
ECCCurve -> String
(Int -> ECCCurve -> ShowS)
-> (ECCCurve -> String) -> ([ECCCurve] -> ShowS) -> Show ECCCurve
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ECCCurve -> ShowS
showsPrec :: Int -> ECCCurve -> ShowS
$cshow :: ECCCurve -> String
show :: ECCCurve -> String
$cshowList :: [ECCCurve] -> ShowS
showList :: [ECCCurve] -> ShowS
Show, Typeable)
instance Pretty ECCCurve where
pretty :: forall ann. ECCCurve -> Doc ann
pretty ECCCurve
NISTP256 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"NIST P-256"
pretty ECCCurve
NISTP384 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"NIST P-384"
pretty ECCCurve
NISTP521 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"NIST P-521"
pretty ECCCurve
Curve25519 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"Curve25519"
pretty ECCCurve
Curve448 = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"Curve448"
instance Hashable ECCCurve
newtype Block a
= Block
{ forall a. Block a -> [a]
unBlock :: [a]
}
deriving (Block a -> Block a -> Bool
(Block a -> Block a -> Bool)
-> (Block a -> Block a -> Bool) -> Eq (Block a)
forall a. Eq a => Block a -> Block a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: forall a. Eq a => Block a -> Block a -> Bool
== :: Block a -> Block a -> Bool
$c/= :: forall a. Eq a => Block a -> Block a -> Bool
/= :: Block a -> Block a -> Bool
Eq, Int -> Block a -> ShowS
[Block a] -> ShowS
Block a -> String
(Int -> Block a -> ShowS)
-> (Block a -> String) -> ([Block a] -> ShowS) -> Show (Block a)
forall a. Show a => Int -> Block a -> ShowS
forall a. Show a => [Block a] -> ShowS
forall a. Show a => Block a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall a. Show a => Int -> Block a -> ShowS
showsPrec :: Int -> Block a -> ShowS
$cshow :: forall a. Show a => Block a -> String
show :: Block a -> String
$cshowList :: forall a. Show a => [Block a] -> ShowS
showList :: [Block a] -> ShowS
Show)
newtype Passphrase = Passphrase {Passphrase -> ByteString
unPassphrase :: B.ByteString}
deriving
(Eq Passphrase
Ord Passphrase
Monoid Passphrase
ByteArrayAccess Passphrase
(Eq Passphrase, Ord Passphrase, Monoid Passphrase,
ByteArrayAccess Passphrase) =>
(forall p a. Int -> (Ptr p -> IO a) -> IO (a, Passphrase))
-> ByteArray Passphrase
forall ba.
(Eq ba, Ord ba, Monoid ba, ByteArrayAccess ba) =>
(forall p a. Int -> (Ptr p -> IO a) -> IO (a, ba)) -> ByteArray ba
forall p a. Int -> (Ptr p -> IO a) -> IO (a, Passphrase)
$callocRet :: forall p a. Int -> (Ptr p -> IO a) -> IO (a, Passphrase)
allocRet :: forall p a. Int -> (Ptr p -> IO a) -> IO (a, Passphrase)
ByteArray, Passphrase -> Int
(Passphrase -> Int)
-> (forall p a. Passphrase -> (Ptr p -> IO a) -> IO a)
-> (forall p. Passphrase -> Ptr p -> IO ())
-> ByteArrayAccess Passphrase
forall p. Passphrase -> Ptr p -> IO ()
forall ba.
(ba -> Int)
-> (forall p a. ba -> (Ptr p -> IO a) -> IO a)
-> (forall p. ba -> Ptr p -> IO ())
-> ByteArrayAccess ba
forall p a. Passphrase -> (Ptr p -> IO a) -> IO a
$clength :: Passphrase -> Int
length :: Passphrase -> Int
$cwithByteArray :: forall p a. Passphrase -> (Ptr p -> IO a) -> IO a
withByteArray :: forall p a. Passphrase -> (Ptr p -> IO a) -> IO a
$ccopyByteArrayToPtr :: forall p. Passphrase -> Ptr p -> IO ()
copyByteArrayToPtr :: forall p. Passphrase -> Ptr p -> IO ()
ByteArrayAccess, Passphrase -> Passphrase -> Bool
(Passphrase -> Passphrase -> Bool)
-> (Passphrase -> Passphrase -> Bool) -> Eq Passphrase
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Passphrase -> Passphrase -> Bool
== :: Passphrase -> Passphrase -> Bool
$c/= :: Passphrase -> Passphrase -> Bool
/= :: Passphrase -> Passphrase -> Bool
Eq, Semigroup Passphrase
Passphrase
Semigroup Passphrase =>
Passphrase
-> (Passphrase -> Passphrase -> Passphrase)
-> ([Passphrase] -> Passphrase)
-> Monoid Passphrase
[Passphrase] -> Passphrase
Passphrase -> Passphrase -> Passphrase
forall a.
Semigroup a =>
a -> (a -> a -> a) -> ([a] -> a) -> Monoid a
$cmempty :: Passphrase
mempty :: Passphrase
$cmappend :: Passphrase -> Passphrase -> Passphrase
mappend :: Passphrase -> Passphrase -> Passphrase
$cmconcat :: [Passphrase] -> Passphrase
mconcat :: [Passphrase] -> Passphrase
Monoid, Eq Passphrase
Eq Passphrase =>
(Passphrase -> Passphrase -> Ordering)
-> (Passphrase -> Passphrase -> Bool)
-> (Passphrase -> Passphrase -> Bool)
-> (Passphrase -> Passphrase -> Bool)
-> (Passphrase -> Passphrase -> Bool)
-> (Passphrase -> Passphrase -> Passphrase)
-> (Passphrase -> Passphrase -> Passphrase)
-> Ord Passphrase
Passphrase -> Passphrase -> Bool
Passphrase -> Passphrase -> Ordering
Passphrase -> Passphrase -> Passphrase
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Passphrase -> Passphrase -> Ordering
compare :: Passphrase -> Passphrase -> Ordering
$c< :: Passphrase -> Passphrase -> Bool
< :: Passphrase -> Passphrase -> Bool
$c<= :: Passphrase -> Passphrase -> Bool
<= :: Passphrase -> Passphrase -> Bool
$c> :: Passphrase -> Passphrase -> Bool
> :: Passphrase -> Passphrase -> Bool
$c>= :: Passphrase -> Passphrase -> Bool
>= :: Passphrase -> Passphrase -> Bool
$cmax :: Passphrase -> Passphrase -> Passphrase
max :: Passphrase -> Passphrase -> Passphrase
$cmin :: Passphrase -> Passphrase -> Passphrase
min :: Passphrase -> Passphrase -> Passphrase
Ord, NonEmpty Passphrase -> Passphrase
Passphrase -> Passphrase -> Passphrase
(Passphrase -> Passphrase -> Passphrase)
-> (NonEmpty Passphrase -> Passphrase)
-> (forall b. Integral b => b -> Passphrase -> Passphrase)
-> Semigroup Passphrase
forall b. Integral b => b -> Passphrase -> Passphrase
forall a.
(a -> a -> a)
-> (NonEmpty a -> a)
-> (forall b. Integral b => b -> a -> a)
-> Semigroup a
$c<> :: Passphrase -> Passphrase -> Passphrase
<> :: Passphrase -> Passphrase -> Passphrase
$csconcat :: NonEmpty Passphrase -> Passphrase
sconcat :: NonEmpty Passphrase -> Passphrase
$cstimes :: forall b. Integral b => b -> Passphrase -> Passphrase
stimes :: forall b. Integral b => b -> Passphrase -> Passphrase
Semigroup, Int -> Passphrase -> ShowS
[Passphrase] -> ShowS
Passphrase -> String
(Int -> Passphrase -> ShowS)
-> (Passphrase -> String)
-> ([Passphrase] -> ShowS)
-> Show Passphrase
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Passphrase -> ShowS
showsPrec :: Int -> Passphrase -> ShowS
$cshow :: Passphrase -> String
show :: Passphrase -> String
$cshowList :: [Passphrase] -> ShowS
showList :: [Passphrase] -> ShowS
Show)