{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TemplateHaskell #-}
module Codec.Encryption.OpenPGP.Types.Internal.Base where
import GHC.Generics (Generic)
import Codec.Encryption.OpenPGP.Types.Internal.PrettyUtils (prettyLBS)
import Control.Applicative ((<|>))
import Control.Arrow ((***))
import Control.Lens (makeLenses, op, Wrapped)
import Control.Monad (mzero)
import Data.Aeson ((.=), object)
import qualified Data.Aeson as A
#if MIN_VERSION_aeson(2,0,0)
import qualified Data.Aeson.Key as AK
#endif
import qualified Data.Aeson.TH as ATH
import Data.ByteArray (ByteArrayAccess)
import qualified Data.ByteString as B
import qualified Data.ByteString.Base16.Lazy as B16L
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.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 qualified Data.Text as T
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 Network.URI (URI(..), nullURI, parseURI, uriToString)
import Numeric (readHex)
import Prettyprinter (Pretty(..), (<+>), hsep, punctuate, space)
type Exportability = Bool
type TrustLevel = Word8
type TrustAmount = Word8
type AlmostPublicDomainRegex = ByteString
type Revocability = Bool
type RevocationReason = Text
type KeyServer = ByteString
type SignatureHash = ByteString
type PacketVersion = Word8
type V3Expiration = Word16
type CompressedDataPayload = ByteString
type FileName = ByteString
type ImageData = ByteString
type NestedFlag = Bool
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 -> DataType
SymmetricAlgorithm -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SymmetricAlgorithm -> m SymmetricAlgorithm
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SymmetricAlgorithm -> m SymmetricAlgorithm
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SymmetricAlgorithm -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SymmetricAlgorithm -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> SymmetricAlgorithm -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SymmetricAlgorithm -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymmetricAlgorithm -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymmetricAlgorithm -> r
gmapT :: (forall b. Data b => b -> b)
-> SymmetricAlgorithm -> SymmetricAlgorithm
$cgmapT :: (forall b. Data b => b -> b)
-> SymmetricAlgorithm -> SymmetricAlgorithm
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SymmetricAlgorithm)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SymmetricAlgorithm)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SymmetricAlgorithm)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SymmetricAlgorithm)
dataTypeOf :: SymmetricAlgorithm -> DataType
$cdataTypeOf :: SymmetricAlgorithm -> DataType
toConstr :: SymmetricAlgorithm -> Constr
$ctoConstr :: SymmetricAlgorithm -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymmetricAlgorithm
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymmetricAlgorithm
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SymmetricAlgorithm
-> c SymmetricAlgorithm
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SymmetricAlgorithm
-> c 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
$cto :: forall x. Rep SymmetricAlgorithm x -> SymmetricAlgorithm
$cfrom :: forall x. SymmetricAlgorithm -> Rep SymmetricAlgorithm x
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
showList :: [SymmetricAlgorithm] -> ShowS
$cshowList :: [SymmetricAlgorithm] -> ShowS
show :: SymmetricAlgorithm -> String
$cshow :: SymmetricAlgorithm -> String
showsPrec :: Int -> SymmetricAlgorithm -> ShowS
$cshowsPrec :: Int -> 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 a ann. Pretty a => a -> Doc ann
pretty String
"plaintext"
pretty SymmetricAlgorithm
IDEA = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"IDEA"
pretty SymmetricAlgorithm
TripleDES = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"3DES"
pretty SymmetricAlgorithm
CAST5 = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"CAST-128"
pretty SymmetricAlgorithm
Blowfish = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"Blowfish"
pretty SymmetricAlgorithm
ReservedSAFER = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"(reserved) SAFER"
pretty SymmetricAlgorithm
ReservedDES = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"(reserved) DES"
pretty SymmetricAlgorithm
AES128 = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"AES-128"
pretty SymmetricAlgorithm
AES192 = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"AES-192"
pretty SymmetricAlgorithm
AES256 = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"AES-256"
pretty SymmetricAlgorithm
Twofish = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"Twofish"
pretty SymmetricAlgorithm
Camellia128 = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"Camellia-128"
pretty SymmetricAlgorithm
Camellia192 = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"Camellia-192"
pretty SymmetricAlgorithm
Camellia256 = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"Camellia-256"
pretty (OtherSA Word8
sa) = 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 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 -> DataType
NotationFlag -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotationFlag -> m NotationFlag
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotationFlag -> m NotationFlag
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NotationFlag -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NotationFlag -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> NotationFlag -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> NotationFlag -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotationFlag -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotationFlag -> r
gmapT :: (forall b. Data b => b -> b) -> NotationFlag -> NotationFlag
$cgmapT :: (forall b. Data b => b -> b) -> NotationFlag -> NotationFlag
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NotationFlag)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NotationFlag)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotationFlag)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotationFlag)
dataTypeOf :: NotationFlag -> DataType
$cdataTypeOf :: NotationFlag -> DataType
toConstr :: NotationFlag -> Constr
$ctoConstr :: NotationFlag -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotationFlag
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotationFlag
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotationFlag -> c NotationFlag
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotationFlag -> c 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
$cto :: forall x. Rep NotationFlag x -> NotationFlag
$cfrom :: forall x. NotationFlag -> Rep NotationFlag x
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
showList :: [NotationFlag] -> ShowS
$cshowList :: [NotationFlag] -> ShowS
show :: NotationFlag -> String
$cshow :: NotationFlag -> String
showsPrec :: Int -> NotationFlag -> ShowS
$cshowsPrec :: Int -> NotationFlag -> ShowS
Show, Typeable)
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
toFFlag :: Int -> NotationFlag
toFFlag Int
0 = NotationFlag
HumanReadable
toFFlag Int
o = Word8 -> NotationFlag
OtherNF (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 a ann. Pretty a => a -> Doc ann
pretty String
"human-readable"
pretty (OtherNF Word8
o) = 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 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
maxBound :: ThirtyTwoBitTimeStamp
$cmaxBound :: ThirtyTwoBitTimeStamp
minBound :: ThirtyTwoBitTimeStamp
$cminBound :: 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 -> DataType
ThirtyTwoBitTimeStamp -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitTimeStamp -> m ThirtyTwoBitTimeStamp
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitTimeStamp -> m ThirtyTwoBitTimeStamp
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ThirtyTwoBitTimeStamp -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ThirtyTwoBitTimeStamp -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> ThirtyTwoBitTimeStamp -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> ThirtyTwoBitTimeStamp -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ThirtyTwoBitTimeStamp -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ThirtyTwoBitTimeStamp -> r
gmapT :: (forall b. Data b => b -> b)
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$cgmapT :: (forall b. Data b => b -> b)
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ThirtyTwoBitTimeStamp)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ThirtyTwoBitTimeStamp)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ThirtyTwoBitTimeStamp)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ThirtyTwoBitTimeStamp)
dataTypeOf :: ThirtyTwoBitTimeStamp -> DataType
$cdataTypeOf :: ThirtyTwoBitTimeStamp -> DataType
toConstr :: ThirtyTwoBitTimeStamp -> Constr
$ctoConstr :: ThirtyTwoBitTimeStamp -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ThirtyTwoBitTimeStamp
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ThirtyTwoBitTimeStamp
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ThirtyTwoBitTimeStamp
-> c ThirtyTwoBitTimeStamp
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ThirtyTwoBitTimeStamp
-> c 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
enumFromThenTo :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> [ThirtyTwoBitTimeStamp]
$cenumFromThenTo :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> [ThirtyTwoBitTimeStamp]
enumFromTo :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> [ThirtyTwoBitTimeStamp]
$cenumFromTo :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> [ThirtyTwoBitTimeStamp]
enumFromThen :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> [ThirtyTwoBitTimeStamp]
$cenumFromThen :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> [ThirtyTwoBitTimeStamp]
enumFrom :: ThirtyTwoBitTimeStamp -> [ThirtyTwoBitTimeStamp]
$cenumFrom :: ThirtyTwoBitTimeStamp -> [ThirtyTwoBitTimeStamp]
fromEnum :: ThirtyTwoBitTimeStamp -> Int
$cfromEnum :: ThirtyTwoBitTimeStamp -> Int
toEnum :: Int -> ThirtyTwoBitTimeStamp
$ctoEnum :: Int -> ThirtyTwoBitTimeStamp
pred :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$cpred :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
succ :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$csucc :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
Enum
, ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool
(ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool)
-> (ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool)
-> Eq ThirtyTwoBitTimeStamp
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool
$c/= :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool
== :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool
$c== :: 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
$cto :: forall x. Rep ThirtyTwoBitTimeStamp x -> ThirtyTwoBitTimeStamp
$cfrom :: forall x. ThirtyTwoBitTimeStamp -> Rep ThirtyTwoBitTimeStamp x
Generic
, Int -> ThirtyTwoBitTimeStamp -> Int
ThirtyTwoBitTimeStamp -> Int
(Int -> ThirtyTwoBitTimeStamp -> Int)
-> (ThirtyTwoBitTimeStamp -> Int) -> Hashable ThirtyTwoBitTimeStamp
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: ThirtyTwoBitTimeStamp -> Int
$chash :: ThirtyTwoBitTimeStamp -> Int
hashWithSalt :: Int -> ThirtyTwoBitTimeStamp -> Int
$chashWithSalt :: Int -> 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
toInteger :: ThirtyTwoBitTimeStamp -> Integer
$ctoInteger :: ThirtyTwoBitTimeStamp -> Integer
divMod :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> (ThirtyTwoBitTimeStamp, ThirtyTwoBitTimeStamp)
$cdivMod :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> (ThirtyTwoBitTimeStamp, ThirtyTwoBitTimeStamp)
quotRem :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> (ThirtyTwoBitTimeStamp, ThirtyTwoBitTimeStamp)
$cquotRem :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp
-> (ThirtyTwoBitTimeStamp, ThirtyTwoBitTimeStamp)
mod :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$cmod :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
div :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$cdiv :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
rem :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$crem :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
quot :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$cquot :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
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
fromInteger :: Integer -> ThirtyTwoBitTimeStamp
$cfromInteger :: Integer -> ThirtyTwoBitTimeStamp
signum :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$csignum :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
abs :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$cabs :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
negate :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$cnegate :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
* :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$c* :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
- :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$c- :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
+ :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$c+ :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> 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
min :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$cmin :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
max :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
$cmax :: ThirtyTwoBitTimeStamp
-> ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp
>= :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Bool
$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
compare :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Ordering
$ccompare :: ThirtyTwoBitTimeStamp -> ThirtyTwoBitTimeStamp -> Ordering
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
toRational :: ThirtyTwoBitTimeStamp -> Rational
$ctoRational :: 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
showList :: [ThirtyTwoBitTimeStamp] -> ShowS
$cshowList :: [ThirtyTwoBitTimeStamp] -> ShowS
show :: ThirtyTwoBitTimeStamp -> String
$cshow :: ThirtyTwoBitTimeStamp -> String
showsPrec :: Int -> ThirtyTwoBitTimeStamp -> ShowS
$cshowsPrec :: Int -> ThirtyTwoBitTimeStamp -> ShowS
Show
, Typeable
)
instance Wrapped ThirtyTwoBitTimeStamp
instance Pretty ThirtyTwoBitTimeStamp where
pretty :: forall ann. ThirtyTwoBitTimeStamp -> Doc ann
pretty =
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
maxBound :: ThirtyTwoBitDuration
$cmaxBound :: ThirtyTwoBitDuration
minBound :: ThirtyTwoBitDuration
$cminBound :: 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 -> DataType
ThirtyTwoBitDuration -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitDuration -> m ThirtyTwoBitDuration
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ThirtyTwoBitDuration -> m ThirtyTwoBitDuration
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ThirtyTwoBitDuration -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ThirtyTwoBitDuration -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> ThirtyTwoBitDuration -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> ThirtyTwoBitDuration -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ThirtyTwoBitDuration -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ThirtyTwoBitDuration -> r
gmapT :: (forall b. Data b => b -> b)
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$cgmapT :: (forall b. Data b => b -> b)
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ThirtyTwoBitDuration)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ThirtyTwoBitDuration)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ThirtyTwoBitDuration)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ThirtyTwoBitDuration)
dataTypeOf :: ThirtyTwoBitDuration -> DataType
$cdataTypeOf :: ThirtyTwoBitDuration -> DataType
toConstr :: ThirtyTwoBitDuration -> Constr
$ctoConstr :: ThirtyTwoBitDuration -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ThirtyTwoBitDuration
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ThirtyTwoBitDuration
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ThirtyTwoBitDuration
-> c ThirtyTwoBitDuration
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ThirtyTwoBitDuration
-> c 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
enumFromThenTo :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> [ThirtyTwoBitDuration]
$cenumFromThenTo :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> [ThirtyTwoBitDuration]
enumFromTo :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> [ThirtyTwoBitDuration]
$cenumFromTo :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> [ThirtyTwoBitDuration]
enumFromThen :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> [ThirtyTwoBitDuration]
$cenumFromThen :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> [ThirtyTwoBitDuration]
enumFrom :: ThirtyTwoBitDuration -> [ThirtyTwoBitDuration]
$cenumFrom :: ThirtyTwoBitDuration -> [ThirtyTwoBitDuration]
fromEnum :: ThirtyTwoBitDuration -> Int
$cfromEnum :: ThirtyTwoBitDuration -> Int
toEnum :: Int -> ThirtyTwoBitDuration
$ctoEnum :: Int -> ThirtyTwoBitDuration
pred :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$cpred :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration
succ :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$csucc :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration
Enum
, ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool
(ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool)
-> (ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool)
-> Eq ThirtyTwoBitDuration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool
$c/= :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool
== :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool
$c== :: 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
$cto :: forall x. Rep ThirtyTwoBitDuration x -> ThirtyTwoBitDuration
$cfrom :: forall x. ThirtyTwoBitDuration -> Rep ThirtyTwoBitDuration x
Generic
, Int -> ThirtyTwoBitDuration -> Int
ThirtyTwoBitDuration -> Int
(Int -> ThirtyTwoBitDuration -> Int)
-> (ThirtyTwoBitDuration -> Int) -> Hashable ThirtyTwoBitDuration
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: ThirtyTwoBitDuration -> Int
$chash :: ThirtyTwoBitDuration -> Int
hashWithSalt :: Int -> ThirtyTwoBitDuration -> Int
$chashWithSalt :: Int -> 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
toInteger :: ThirtyTwoBitDuration -> Integer
$ctoInteger :: ThirtyTwoBitDuration -> Integer
divMod :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> (ThirtyTwoBitDuration, ThirtyTwoBitDuration)
$cdivMod :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> (ThirtyTwoBitDuration, ThirtyTwoBitDuration)
quotRem :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> (ThirtyTwoBitDuration, ThirtyTwoBitDuration)
$cquotRem :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration
-> (ThirtyTwoBitDuration, ThirtyTwoBitDuration)
mod :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$cmod :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
div :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$cdiv :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
rem :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$crem :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
quot :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$cquot :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
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
fromInteger :: Integer -> ThirtyTwoBitDuration
$cfromInteger :: Integer -> ThirtyTwoBitDuration
signum :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$csignum :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration
abs :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$cabs :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration
negate :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$cnegate :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration
* :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$c* :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
- :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$c- :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
+ :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$c+ :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> 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
min :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$cmin :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
max :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
$cmax :: ThirtyTwoBitDuration
-> ThirtyTwoBitDuration -> ThirtyTwoBitDuration
>= :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Bool
$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
compare :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Ordering
$ccompare :: ThirtyTwoBitDuration -> ThirtyTwoBitDuration -> Ordering
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
toRational :: ThirtyTwoBitDuration -> Rational
$ctoRational :: 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
showList :: [ThirtyTwoBitDuration] -> ShowS
$cshowList :: [ThirtyTwoBitDuration] -> ShowS
show :: ThirtyTwoBitDuration -> String
$cshow :: ThirtyTwoBitDuration -> String
showsPrec :: Int -> ThirtyTwoBitDuration -> ShowS
$cshowsPrec :: Int -> ThirtyTwoBitDuration -> ShowS
Show
, Typeable
)
instance Wrapped ThirtyTwoBitDuration
instance Pretty ThirtyTwoBitDuration where
pretty :: forall ann. ThirtyTwoBitDuration -> Doc ann
pretty = 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 -> DataType
RevocationClass -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RevocationClass -> m RevocationClass
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RevocationClass -> m RevocationClass
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> RevocationClass -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> RevocationClass -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> RevocationClass -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> RevocationClass -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationClass -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationClass -> r
gmapT :: (forall b. Data b => b -> b) -> RevocationClass -> RevocationClass
$cgmapT :: (forall b. Data b => b -> b) -> RevocationClass -> RevocationClass
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RevocationClass)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RevocationClass)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RevocationClass)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RevocationClass)
dataTypeOf :: RevocationClass -> DataType
$cdataTypeOf :: RevocationClass -> DataType
toConstr :: RevocationClass -> Constr
$ctoConstr :: RevocationClass -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RevocationClass
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RevocationClass
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RevocationClass -> c RevocationClass
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RevocationClass -> c 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
$cto :: forall x. Rep RevocationClass x -> RevocationClass
$cfrom :: forall x. RevocationClass -> Rep RevocationClass x
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
showList :: [RevocationClass] -> ShowS
$cshowList :: [RevocationClass] -> ShowS
show :: RevocationClass -> String
$cshow :: RevocationClass -> String
showsPrec :: Int -> RevocationClass -> ShowS
$cshowsPrec :: Int -> RevocationClass -> ShowS
Show, Typeable)
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
toFFlag :: Int -> RevocationClass
toFFlag Int
1 = RevocationClass
SensitiveRK
toFFlag Int
i = Word8 -> RevocationClass
RClOther (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 a ann. Pretty a => a -> Doc ann
pretty String
"sensitive"
pretty (RClOther Word8
o) = 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 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
| EdDSA
| OtherPKA Word8
deriving (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
showList :: [PubKeyAlgorithm] -> ShowS
$cshowList :: [PubKeyAlgorithm] -> ShowS
show :: PubKeyAlgorithm -> String
$cshow :: PubKeyAlgorithm -> String
showsPrec :: Int -> PubKeyAlgorithm -> ShowS
$cshowsPrec :: Int -> PubKeyAlgorithm -> ShowS
Show, 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 -> DataType
PubKeyAlgorithm -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PubKeyAlgorithm -> m PubKeyAlgorithm
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PubKeyAlgorithm -> m PubKeyAlgorithm
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> PubKeyAlgorithm -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> PubKeyAlgorithm -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> PubKeyAlgorithm -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> PubKeyAlgorithm -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PubKeyAlgorithm -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PubKeyAlgorithm -> r
gmapT :: (forall b. Data b => b -> b) -> PubKeyAlgorithm -> PubKeyAlgorithm
$cgmapT :: (forall b. Data b => b -> b) -> PubKeyAlgorithm -> PubKeyAlgorithm
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PubKeyAlgorithm)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PubKeyAlgorithm)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PubKeyAlgorithm)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PubKeyAlgorithm)
dataTypeOf :: PubKeyAlgorithm -> DataType
$cdataTypeOf :: PubKeyAlgorithm -> DataType
toConstr :: PubKeyAlgorithm -> Constr
$ctoConstr :: PubKeyAlgorithm -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PubKeyAlgorithm
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PubKeyAlgorithm
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PubKeyAlgorithm -> c PubKeyAlgorithm
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PubKeyAlgorithm -> c 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
$cto :: forall x. Rep PubKeyAlgorithm x -> PubKeyAlgorithm
$cfrom :: forall x. PubKeyAlgorithm -> Rep PubKeyAlgorithm x
Generic, 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
EdDSA = Word8
22
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
EdDSA
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 a ann. Pretty a => a -> Doc ann
pretty String
"RSA"
pretty PubKeyAlgorithm
DeprecatedRSAEncryptOnly = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"(deprecated) RSA encrypt-only"
pretty PubKeyAlgorithm
DeprecatedRSASignOnly = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"(deprecated) RSA sign-only"
pretty PubKeyAlgorithm
ElgamalEncryptOnly = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"Elgamal encrypt-only"
pretty PubKeyAlgorithm
DSA = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"DSA"
pretty PubKeyAlgorithm
ECDH = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"ECDH"
pretty PubKeyAlgorithm
ECDSA = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"ECDSA"
pretty PubKeyAlgorithm
ForbiddenElgamal = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"(forbidden) Elgamal"
pretty PubKeyAlgorithm
DH = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"DH"
pretty PubKeyAlgorithm
EdDSA = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"EdDSA"
pretty (OtherPKA Word8
pka) = 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 a ann. Pretty a => a -> Doc ann
pretty Word8
pka
$(ATH.deriveJSON ATH.defaultOptions ''PubKeyAlgorithm)
newtype TwentyOctetFingerprint =
TwentyOctetFingerprint
{ TwentyOctetFingerprint -> ByteString
unTOF :: ByteString
}
deriving (Typeable TwentyOctetFingerprint
Typeable TwentyOctetFingerprint
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> TwentyOctetFingerprint
-> c TwentyOctetFingerprint)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TwentyOctetFingerprint)
-> (TwentyOctetFingerprint -> Constr)
-> (TwentyOctetFingerprint -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TwentyOctetFingerprint))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TwentyOctetFingerprint))
-> ((forall b. Data b => b -> b)
-> TwentyOctetFingerprint -> TwentyOctetFingerprint)
-> (forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> TwentyOctetFingerprint
-> r)
-> (forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> TwentyOctetFingerprint
-> r)
-> (forall u.
(forall d. Data d => d -> u) -> TwentyOctetFingerprint -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> TwentyOctetFingerprint -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> TwentyOctetFingerprint -> m TwentyOctetFingerprint)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> TwentyOctetFingerprint -> m TwentyOctetFingerprint)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> TwentyOctetFingerprint -> m TwentyOctetFingerprint)
-> Data TwentyOctetFingerprint
TwentyOctetFingerprint -> DataType
TwentyOctetFingerprint -> Constr
(forall b. Data b => b -> b)
-> TwentyOctetFingerprint -> TwentyOctetFingerprint
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) -> TwentyOctetFingerprint -> u
forall u.
(forall d. Data d => d -> u) -> TwentyOctetFingerprint -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> TwentyOctetFingerprint
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> TwentyOctetFingerprint
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> TwentyOctetFingerprint -> m TwentyOctetFingerprint
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> TwentyOctetFingerprint -> m TwentyOctetFingerprint
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TwentyOctetFingerprint
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> TwentyOctetFingerprint
-> c TwentyOctetFingerprint
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TwentyOctetFingerprint)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TwentyOctetFingerprint)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> TwentyOctetFingerprint -> m TwentyOctetFingerprint
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> TwentyOctetFingerprint -> m TwentyOctetFingerprint
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> TwentyOctetFingerprint -> m TwentyOctetFingerprint
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> TwentyOctetFingerprint -> m TwentyOctetFingerprint
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> TwentyOctetFingerprint -> m TwentyOctetFingerprint
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> TwentyOctetFingerprint -> m TwentyOctetFingerprint
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> TwentyOctetFingerprint -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> TwentyOctetFingerprint -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> TwentyOctetFingerprint -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> TwentyOctetFingerprint -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> TwentyOctetFingerprint
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> TwentyOctetFingerprint
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> TwentyOctetFingerprint
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> TwentyOctetFingerprint
-> r
gmapT :: (forall b. Data b => b -> b)
-> TwentyOctetFingerprint -> TwentyOctetFingerprint
$cgmapT :: (forall b. Data b => b -> b)
-> TwentyOctetFingerprint -> TwentyOctetFingerprint
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TwentyOctetFingerprint)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TwentyOctetFingerprint)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TwentyOctetFingerprint)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TwentyOctetFingerprint)
dataTypeOf :: TwentyOctetFingerprint -> DataType
$cdataTypeOf :: TwentyOctetFingerprint -> DataType
toConstr :: TwentyOctetFingerprint -> Constr
$ctoConstr :: TwentyOctetFingerprint -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TwentyOctetFingerprint
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TwentyOctetFingerprint
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> TwentyOctetFingerprint
-> c TwentyOctetFingerprint
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> TwentyOctetFingerprint
-> c TwentyOctetFingerprint
Data, TwentyOctetFingerprint -> TwentyOctetFingerprint -> Bool
(TwentyOctetFingerprint -> TwentyOctetFingerprint -> Bool)
-> (TwentyOctetFingerprint -> TwentyOctetFingerprint -> Bool)
-> Eq TwentyOctetFingerprint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TwentyOctetFingerprint -> TwentyOctetFingerprint -> Bool
$c/= :: TwentyOctetFingerprint -> TwentyOctetFingerprint -> Bool
== :: TwentyOctetFingerprint -> TwentyOctetFingerprint -> Bool
$c== :: TwentyOctetFingerprint -> TwentyOctetFingerprint -> Bool
Eq, (forall x. TwentyOctetFingerprint -> Rep TwentyOctetFingerprint x)
-> (forall x.
Rep TwentyOctetFingerprint x -> TwentyOctetFingerprint)
-> Generic TwentyOctetFingerprint
forall x. Rep TwentyOctetFingerprint x -> TwentyOctetFingerprint
forall x. TwentyOctetFingerprint -> Rep TwentyOctetFingerprint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TwentyOctetFingerprint x -> TwentyOctetFingerprint
$cfrom :: forall x. TwentyOctetFingerprint -> Rep TwentyOctetFingerprint x
Generic, Eq TwentyOctetFingerprint
Eq TwentyOctetFingerprint
-> (TwentyOctetFingerprint -> TwentyOctetFingerprint -> Ordering)
-> (TwentyOctetFingerprint -> TwentyOctetFingerprint -> Bool)
-> (TwentyOctetFingerprint -> TwentyOctetFingerprint -> Bool)
-> (TwentyOctetFingerprint -> TwentyOctetFingerprint -> Bool)
-> (TwentyOctetFingerprint -> TwentyOctetFingerprint -> Bool)
-> (TwentyOctetFingerprint
-> TwentyOctetFingerprint -> TwentyOctetFingerprint)
-> (TwentyOctetFingerprint
-> TwentyOctetFingerprint -> TwentyOctetFingerprint)
-> Ord TwentyOctetFingerprint
TwentyOctetFingerprint -> TwentyOctetFingerprint -> Bool
TwentyOctetFingerprint -> TwentyOctetFingerprint -> Ordering
TwentyOctetFingerprint
-> TwentyOctetFingerprint -> TwentyOctetFingerprint
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
min :: TwentyOctetFingerprint
-> TwentyOctetFingerprint -> TwentyOctetFingerprint
$cmin :: TwentyOctetFingerprint
-> TwentyOctetFingerprint -> TwentyOctetFingerprint
max :: TwentyOctetFingerprint
-> TwentyOctetFingerprint -> TwentyOctetFingerprint
$cmax :: TwentyOctetFingerprint
-> TwentyOctetFingerprint -> TwentyOctetFingerprint
>= :: TwentyOctetFingerprint -> TwentyOctetFingerprint -> Bool
$c>= :: TwentyOctetFingerprint -> TwentyOctetFingerprint -> Bool
> :: TwentyOctetFingerprint -> TwentyOctetFingerprint -> Bool
$c> :: TwentyOctetFingerprint -> TwentyOctetFingerprint -> Bool
<= :: TwentyOctetFingerprint -> TwentyOctetFingerprint -> Bool
$c<= :: TwentyOctetFingerprint -> TwentyOctetFingerprint -> Bool
< :: TwentyOctetFingerprint -> TwentyOctetFingerprint -> Bool
$c< :: TwentyOctetFingerprint -> TwentyOctetFingerprint -> Bool
compare :: TwentyOctetFingerprint -> TwentyOctetFingerprint -> Ordering
$ccompare :: TwentyOctetFingerprint -> TwentyOctetFingerprint -> Ordering
Ord, Int -> TwentyOctetFingerprint -> ShowS
[TwentyOctetFingerprint] -> ShowS
TwentyOctetFingerprint -> String
(Int -> TwentyOctetFingerprint -> ShowS)
-> (TwentyOctetFingerprint -> String)
-> ([TwentyOctetFingerprint] -> ShowS)
-> Show TwentyOctetFingerprint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TwentyOctetFingerprint] -> ShowS
$cshowList :: [TwentyOctetFingerprint] -> ShowS
show :: TwentyOctetFingerprint -> String
$cshow :: TwentyOctetFingerprint -> String
showsPrec :: Int -> TwentyOctetFingerprint -> ShowS
$cshowsPrec :: Int -> TwentyOctetFingerprint -> ShowS
Show, Typeable)
instance Wrapped TwentyOctetFingerprint
instance Read TwentyOctetFingerprint where
readsPrec :: Int -> ReadS TwentyOctetFingerprint
readsPrec Int
_ =
([(Word8, String)] -> (TwentyOctetFingerprint, String))
-> [[(Word8, String)]] -> [(TwentyOctetFingerprint, String)]
forall a b. (a -> b) -> [a] -> [b]
map ((ByteString -> TwentyOctetFingerprint
TwentyOctetFingerprint (ByteString -> TwentyOctetFingerprint)
-> ([Word8] -> ByteString) -> [Word8] -> TwentyOctetFingerprint
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Word8] -> ByteString
BL.pack ([Word8] -> TwentyOctetFingerprint)
-> ([String] -> String)
-> ([Word8], [String])
-> (TwentyOctetFingerprint, String)
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]) -> (TwentyOctetFingerprint, String))
-> ([(Word8, String)] -> ([Word8], [String]))
-> [(Word8, String)]
-> (TwentyOctetFingerprint, 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)]] -> [(TwentyOctetFingerprint, String)])
-> (String -> [[(Word8, String)]]) -> ReadS TwentyOctetFingerprint
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Int -> [(Word8, String)] -> [[(Word8, String)]]
forall e. Int -> [e] -> [[e]]
chunksOf Int
20 ([(Word8, String)] -> [[(Word8, String)]])
-> (String -> [(Word8, String)]) -> String -> [[(Word8, String)]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> [(Word8, String)]
hexToW8s (String -> [(Word8, String)])
-> ShowS -> String -> [(Word8, String)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Char -> Bool) -> ShowS
forall a. (a -> Bool) -> [a] -> [a]
filter (Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
/= Char
' ')
instance Hashable TwentyOctetFingerprint
instance Pretty TwentyOctetFingerprint where
pretty :: forall ann. TwentyOctetFingerprint -> Doc ann
pretty = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (String -> Doc ann)
-> (TwentyOctetFingerprint -> String)
-> TwentyOctetFingerprint
-> Doc ann
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> ShowS
forall a. Int -> [a] -> [a]
take Int
40 ShowS
-> (TwentyOctetFingerprint -> String)
-> TwentyOctetFingerprint
-> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> String
bsToHexUpper (ByteString -> String)
-> (TwentyOctetFingerprint -> ByteString)
-> TwentyOctetFingerprint
-> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TwentyOctetFingerprint -> ByteString
unTOF
#if MIN_VERSION_aeson(2,0,0)
key :: String -> Key
key = Text -> Key
AK.fromText (Text -> Key) -> (String -> Text) -> String -> Key
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> Text
T.pack
#else
key = T.pack
#endif
instance A.ToJSON TwentyOctetFingerprint where
toJSON :: TwentyOctetFingerprint -> Value
toJSON TwentyOctetFingerprint
e = [Pair] -> Value
object [String -> Key
key String
"fpr" Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= (String -> Value
forall a. ToJSON a => a -> Value
A.toJSON (String -> Value)
-> (TwentyOctetFingerprint -> String)
-> TwentyOctetFingerprint
-> Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Doc Any -> String
forall a. Show a => a -> String
show (Doc Any -> String)
-> (TwentyOctetFingerprint -> Doc Any)
-> TwentyOctetFingerprint
-> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TwentyOctetFingerprint -> Doc Any
forall a ann. Pretty a => a -> Doc ann
pretty) TwentyOctetFingerprint
e]
instance A.FromJSON TwentyOctetFingerprint where
parseJSON :: Value -> Parser TwentyOctetFingerprint
parseJSON (A.Object Object
v) = ByteString -> TwentyOctetFingerprint
TwentyOctetFingerprint (ByteString -> TwentyOctetFingerprint)
-> (String -> ByteString) -> String -> TwentyOctetFingerprint
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> ByteString
forall a. Read a => String -> a
read (String -> TwentyOctetFingerprint)
-> Parser String -> Parser TwentyOctetFingerprint
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
key String
"fpr"
parseJSON Value
_ = Parser TwentyOctetFingerprint
forall (m :: * -> *) a. MonadPlus m => m a
mzero
newtype SpacedFingerprint =
SpacedFingerprint
{ SpacedFingerprint -> TwentyOctetFingerprint
unSpacedFingerprint :: TwentyOctetFingerprint
}
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 -> DataType
SpacedFingerprint -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SpacedFingerprint -> m SpacedFingerprint
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SpacedFingerprint -> m SpacedFingerprint
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SpacedFingerprint -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SpacedFingerprint -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> SpacedFingerprint -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SpacedFingerprint -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SpacedFingerprint -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SpacedFingerprint -> r
gmapT :: (forall b. Data b => b -> b)
-> SpacedFingerprint -> SpacedFingerprint
$cgmapT :: (forall b. Data b => b -> b)
-> SpacedFingerprint -> SpacedFingerprint
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SpacedFingerprint)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SpacedFingerprint)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SpacedFingerprint)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SpacedFingerprint)
dataTypeOf :: SpacedFingerprint -> DataType
$cdataTypeOf :: SpacedFingerprint -> DataType
toConstr :: SpacedFingerprint -> Constr
$ctoConstr :: SpacedFingerprint -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SpacedFingerprint
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SpacedFingerprint
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SpacedFingerprint -> c SpacedFingerprint
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SpacedFingerprint -> c SpacedFingerprint
Data, SpacedFingerprint -> SpacedFingerprint -> Bool
(SpacedFingerprint -> SpacedFingerprint -> Bool)
-> (SpacedFingerprint -> SpacedFingerprint -> Bool)
-> Eq SpacedFingerprint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SpacedFingerprint -> SpacedFingerprint -> Bool
$c/= :: SpacedFingerprint -> SpacedFingerprint -> Bool
== :: SpacedFingerprint -> SpacedFingerprint -> Bool
$c== :: 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
$cto :: forall x. Rep SpacedFingerprint x -> SpacedFingerprint
$cfrom :: forall x. SpacedFingerprint -> Rep SpacedFingerprint x
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
min :: SpacedFingerprint -> SpacedFingerprint -> SpacedFingerprint
$cmin :: SpacedFingerprint -> SpacedFingerprint -> SpacedFingerprint
max :: SpacedFingerprint -> SpacedFingerprint -> SpacedFingerprint
$cmax :: SpacedFingerprint -> SpacedFingerprint -> SpacedFingerprint
>= :: SpacedFingerprint -> SpacedFingerprint -> Bool
$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
compare :: SpacedFingerprint -> SpacedFingerprint -> Ordering
$ccompare :: SpacedFingerprint -> SpacedFingerprint -> Ordering
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
showList :: [SpacedFingerprint] -> ShowS
$cshowList :: [SpacedFingerprint] -> ShowS
show :: SpacedFingerprint -> String
$cshow :: SpacedFingerprint -> String
showsPrec :: Int -> SpacedFingerprint -> ShowS
$cshowsPrec :: Int -> 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 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
. Int -> ShowS
forall a. Int -> [a] -> [a]
take Int
40 ShowS
-> (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
. TwentyOctetFingerprint -> ByteString
unTOF (TwentyOctetFingerprint -> ByteString)
-> (SpacedFingerprint -> TwentyOctetFingerprint)
-> 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
TwentyOctetFingerprint -> SpacedFingerprint
SpacedFingerprint
bsToHexUpper :: 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
BLC8.unpack (ByteString -> String)
-> (ByteString -> ByteString) -> ByteString -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> ByteString
B16L.encode
hexToW8s :: ReadS Word8
hexToW8s :: String -> [(Word8, String)]
hexToW8s = (String -> [(Word8, String)]) -> [String] -> [(Word8, String)]
forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
concatMap String -> [(Word8, String)]
forall a. (Eq a, Num a) => ReadS a
readHex ([String] -> [(Word8, String)])
-> (String -> [String]) -> String -> [(Word8, String)]
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 EightOctetKeyId =
EightOctetKeyId
{ EightOctetKeyId -> ByteString
unEOKI :: 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 -> DataType
EightOctetKeyId -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> EightOctetKeyId -> m EightOctetKeyId
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> EightOctetKeyId -> m EightOctetKeyId
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> EightOctetKeyId -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> EightOctetKeyId -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> EightOctetKeyId -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> EightOctetKeyId -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> EightOctetKeyId -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> EightOctetKeyId -> r
gmapT :: (forall b. Data b => b -> b) -> EightOctetKeyId -> EightOctetKeyId
$cgmapT :: (forall b. Data b => b -> b) -> EightOctetKeyId -> EightOctetKeyId
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c EightOctetKeyId)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c EightOctetKeyId)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c EightOctetKeyId)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c EightOctetKeyId)
dataTypeOf :: EightOctetKeyId -> DataType
$cdataTypeOf :: EightOctetKeyId -> DataType
toConstr :: EightOctetKeyId -> Constr
$ctoConstr :: EightOctetKeyId -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c EightOctetKeyId
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c EightOctetKeyId
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> EightOctetKeyId -> c EightOctetKeyId
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> EightOctetKeyId -> c EightOctetKeyId
Data, EightOctetKeyId -> EightOctetKeyId -> Bool
(EightOctetKeyId -> EightOctetKeyId -> Bool)
-> (EightOctetKeyId -> EightOctetKeyId -> Bool)
-> Eq EightOctetKeyId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EightOctetKeyId -> EightOctetKeyId -> Bool
$c/= :: EightOctetKeyId -> EightOctetKeyId -> Bool
== :: EightOctetKeyId -> EightOctetKeyId -> Bool
$c== :: 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
$cto :: forall x. Rep EightOctetKeyId x -> EightOctetKeyId
$cfrom :: forall x. EightOctetKeyId -> Rep EightOctetKeyId x
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
min :: EightOctetKeyId -> EightOctetKeyId -> EightOctetKeyId
$cmin :: EightOctetKeyId -> EightOctetKeyId -> EightOctetKeyId
max :: EightOctetKeyId -> EightOctetKeyId -> EightOctetKeyId
$cmax :: EightOctetKeyId -> EightOctetKeyId -> EightOctetKeyId
>= :: EightOctetKeyId -> EightOctetKeyId -> Bool
$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
compare :: EightOctetKeyId -> EightOctetKeyId -> Ordering
$ccompare :: EightOctetKeyId -> EightOctetKeyId -> Ordering
Ord, Int -> EightOctetKeyId -> ShowS
[EightOctetKeyId] -> ShowS
EightOctetKeyId -> String
(Int -> EightOctetKeyId -> ShowS)
-> (EightOctetKeyId -> String)
-> ([EightOctetKeyId] -> ShowS)
-> Show EightOctetKeyId
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EightOctetKeyId] -> ShowS
$cshowList :: [EightOctetKeyId] -> ShowS
show :: EightOctetKeyId -> String
$cshow :: EightOctetKeyId -> String
showsPrec :: Int -> EightOctetKeyId -> ShowS
$cshowsPrec :: Int -> EightOctetKeyId -> ShowS
Show, Typeable)
instance Wrapped EightOctetKeyId
instance Pretty EightOctetKeyId where
pretty :: forall ann. EightOctetKeyId -> Doc ann
pretty = 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 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
BL.pack ([Word8] -> EightOctetKeyId)
-> ([String] -> String)
-> ([Word8], [String])
-> (EightOctetKeyId, String)
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)]])
-> (String -> [(Word8, String)]) -> String -> [[(Word8, String)]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> [(Word8, String)]
hexToW8s
instance Hashable EightOctetKeyId
instance A.ToJSON EightOctetKeyId where
toJSON :: EightOctetKeyId -> Value
toJSON EightOctetKeyId
e = [Pair] -> Value
object [String -> Key
key String
"eoki" Key -> String -> Pair
forall kv v. (KeyValue 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
key String
"eoki"
parseJSON Value
_ = Parser EightOctetKeyId
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 -> DataType
NotationName -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotationName -> m NotationName
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotationName -> m NotationName
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NotationName -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NotationName -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> NotationName -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> NotationName -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotationName -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotationName -> r
gmapT :: (forall b. Data b => b -> b) -> NotationName -> NotationName
$cgmapT :: (forall b. Data b => b -> b) -> NotationName -> NotationName
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NotationName)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NotationName)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotationName)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotationName)
dataTypeOf :: NotationName -> DataType
$cdataTypeOf :: NotationName -> DataType
toConstr :: NotationName -> Constr
$ctoConstr :: NotationName -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotationName
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotationName
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotationName -> c NotationName
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotationName -> c NotationName
Data, NotationName -> NotationName -> Bool
(NotationName -> NotationName -> Bool)
-> (NotationName -> NotationName -> Bool) -> Eq NotationName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NotationName -> NotationName -> Bool
$c/= :: NotationName -> NotationName -> Bool
== :: NotationName -> NotationName -> Bool
$c== :: 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
$cto :: forall x. Rep NotationName x -> NotationName
$cfrom :: forall x. NotationName -> Rep NotationName x
Generic, Int -> NotationName -> Int
NotationName -> Int
(Int -> NotationName -> Int)
-> (NotationName -> Int) -> Hashable NotationName
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: NotationName -> Int
$chash :: NotationName -> Int
hashWithSalt :: Int -> NotationName -> Int
$chashWithSalt :: Int -> 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
min :: NotationName -> NotationName -> NotationName
$cmin :: NotationName -> NotationName -> NotationName
max :: NotationName -> NotationName -> NotationName
$cmax :: NotationName -> NotationName -> NotationName
>= :: NotationName -> NotationName -> Bool
$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
compare :: NotationName -> NotationName -> Ordering
$ccompare :: NotationName -> NotationName -> Ordering
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
showList :: [NotationName] -> ShowS
$cshowList :: [NotationName] -> ShowS
show :: NotationName -> String
$cshow :: NotationName -> String
showsPrec :: Int -> NotationName -> ShowS
$cshowsPrec :: Int -> 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
key String
"notationname" Key -> String -> Pair
forall kv v. (KeyValue 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
key String
"notationname"
parseJSON Value
_ = Parser NotationName
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 -> DataType
NotationValue -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotationValue -> m NotationValue
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotationValue -> m NotationValue
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NotationValue -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NotationValue -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> NotationValue -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> NotationValue -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotationValue -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotationValue -> r
gmapT :: (forall b. Data b => b -> b) -> NotationValue -> NotationValue
$cgmapT :: (forall b. Data b => b -> b) -> NotationValue -> NotationValue
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NotationValue)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NotationValue)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotationValue)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotationValue)
dataTypeOf :: NotationValue -> DataType
$cdataTypeOf :: NotationValue -> DataType
toConstr :: NotationValue -> Constr
$ctoConstr :: NotationValue -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotationValue
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotationValue
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotationValue -> c NotationValue
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotationValue -> c NotationValue
Data, NotationValue -> NotationValue -> Bool
(NotationValue -> NotationValue -> Bool)
-> (NotationValue -> NotationValue -> Bool) -> Eq NotationValue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NotationValue -> NotationValue -> Bool
$c/= :: NotationValue -> NotationValue -> Bool
== :: NotationValue -> NotationValue -> Bool
$c== :: 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
$cto :: forall x. Rep NotationValue x -> NotationValue
$cfrom :: forall x. NotationValue -> Rep NotationValue x
Generic, Int -> NotationValue -> Int
NotationValue -> Int
(Int -> NotationValue -> Int)
-> (NotationValue -> Int) -> Hashable NotationValue
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: NotationValue -> Int
$chash :: NotationValue -> Int
hashWithSalt :: Int -> NotationValue -> Int
$chashWithSalt :: Int -> 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
min :: NotationValue -> NotationValue -> NotationValue
$cmin :: NotationValue -> NotationValue -> NotationValue
max :: NotationValue -> NotationValue -> NotationValue
$cmax :: NotationValue -> NotationValue -> NotationValue
>= :: NotationValue -> NotationValue -> Bool
$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
compare :: NotationValue -> NotationValue -> Ordering
$ccompare :: NotationValue -> NotationValue -> Ordering
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
showList :: [NotationValue] -> ShowS
$cshowList :: [NotationValue] -> ShowS
show :: NotationValue -> String
$cshow :: NotationValue -> String
showsPrec :: Int -> NotationValue -> ShowS
$cshowsPrec :: Int -> 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
key String
"notationvalue" Key -> String -> Pair
forall kv v. (KeyValue 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
key String
"notationvalue"
parseJSON Value
_ = Parser NotationValue
forall (m :: * -> *) a. MonadPlus m => m a
mzero
data HashAlgorithm
= DeprecatedMD5
| SHA1
| RIPEMD160
| SHA256
| SHA384
| SHA512
| SHA224
| 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 -> DataType
HashAlgorithm -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> HashAlgorithm -> m HashAlgorithm
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> HashAlgorithm -> m HashAlgorithm
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> HashAlgorithm -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> HashAlgorithm -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> HashAlgorithm -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> HashAlgorithm -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> HashAlgorithm -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> HashAlgorithm -> r
gmapT :: (forall b. Data b => b -> b) -> HashAlgorithm -> HashAlgorithm
$cgmapT :: (forall b. Data b => b -> b) -> HashAlgorithm -> HashAlgorithm
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c HashAlgorithm)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c HashAlgorithm)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c HashAlgorithm)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c HashAlgorithm)
dataTypeOf :: HashAlgorithm -> DataType
$cdataTypeOf :: HashAlgorithm -> DataType
toConstr :: HashAlgorithm -> Constr
$ctoConstr :: HashAlgorithm -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c HashAlgorithm
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c HashAlgorithm
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> HashAlgorithm -> c HashAlgorithm
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> HashAlgorithm -> c 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
$cto :: forall x. Rep HashAlgorithm x -> HashAlgorithm
$cfrom :: forall x. HashAlgorithm -> Rep HashAlgorithm x
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
showList :: [HashAlgorithm] -> ShowS
$cshowList :: [HashAlgorithm] -> ShowS
show :: HashAlgorithm -> String
$cshow :: HashAlgorithm -> String
showsPrec :: Int -> HashAlgorithm -> ShowS
$cshowsPrec :: Int -> 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 (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
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 a ann. Pretty a => a -> Doc ann
pretty String
"(deprecated) MD5"
pretty HashAlgorithm
SHA1 = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"SHA-1"
pretty HashAlgorithm
RIPEMD160 = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"RIPEMD-160"
pretty HashAlgorithm
SHA256 = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"SHA-256"
pretty HashAlgorithm
SHA384 = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"SHA-384"
pretty HashAlgorithm
SHA512 = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"SHA-512"
pretty HashAlgorithm
SHA224 = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"SHA-224"
pretty (OtherHA Word8
ha) = 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 a ann. Pretty a => a -> Doc ann
pretty Word8
ha
$(ATH.deriveJSON ATH.defaultOptions ''HashAlgorithm)
data CompressionAlgorithm
= Uncompressed
| ZIP
| ZLIB
| BZip2
| OtherCA Word8
deriving (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
showList :: [CompressionAlgorithm] -> ShowS
$cshowList :: [CompressionAlgorithm] -> ShowS
show :: CompressionAlgorithm -> String
$cshow :: CompressionAlgorithm -> String
showsPrec :: Int -> CompressionAlgorithm -> ShowS
$cshowsPrec :: Int -> CompressionAlgorithm -> ShowS
Show, 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 -> DataType
CompressionAlgorithm -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CompressionAlgorithm -> m CompressionAlgorithm
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CompressionAlgorithm -> m CompressionAlgorithm
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> CompressionAlgorithm -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> CompressionAlgorithm -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> CompressionAlgorithm -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> CompressionAlgorithm -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CompressionAlgorithm -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CompressionAlgorithm -> r
gmapT :: (forall b. Data b => b -> b)
-> CompressionAlgorithm -> CompressionAlgorithm
$cgmapT :: (forall b. Data b => b -> b)
-> CompressionAlgorithm -> CompressionAlgorithm
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CompressionAlgorithm)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CompressionAlgorithm)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CompressionAlgorithm)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CompressionAlgorithm)
dataTypeOf :: CompressionAlgorithm -> DataType
$cdataTypeOf :: CompressionAlgorithm -> DataType
toConstr :: CompressionAlgorithm -> Constr
$ctoConstr :: CompressionAlgorithm -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CompressionAlgorithm
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CompressionAlgorithm
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CompressionAlgorithm
-> c CompressionAlgorithm
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CompressionAlgorithm
-> c 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
$cto :: forall x. Rep CompressionAlgorithm x -> CompressionAlgorithm
$cfrom :: forall x. CompressionAlgorithm -> Rep CompressionAlgorithm x
Generic, 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 a ann. Pretty a => a -> Doc ann
pretty String
"uncompressed"
pretty CompressionAlgorithm
ZIP = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"ZIP"
pretty CompressionAlgorithm
ZLIB = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"zlib"
pretty CompressionAlgorithm
BZip2 = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"bzip2"
pretty (OtherCA Word8
ca) =
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 a ann. Pretty a => a -> Doc ann
pretty Word8
ca
$(ATH.deriveJSON ATH.defaultOptions ''CompressionAlgorithm)
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 -> DataType
KSPFlag -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KSPFlag -> m KSPFlag
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KSPFlag -> m KSPFlag
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> KSPFlag -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> KSPFlag -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> KSPFlag -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> KSPFlag -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KSPFlag -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KSPFlag -> r
gmapT :: (forall b. Data b => b -> b) -> KSPFlag -> KSPFlag
$cgmapT :: (forall b. Data b => b -> b) -> KSPFlag -> KSPFlag
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KSPFlag)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KSPFlag)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KSPFlag)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KSPFlag)
dataTypeOf :: KSPFlag -> DataType
$cdataTypeOf :: KSPFlag -> DataType
toConstr :: KSPFlag -> Constr
$ctoConstr :: KSPFlag -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KSPFlag
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KSPFlag
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KSPFlag -> c KSPFlag
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KSPFlag -> c 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
$cto :: forall x. Rep KSPFlag x -> KSPFlag
$cfrom :: forall x. KSPFlag -> Rep KSPFlag x
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
showList :: [KSPFlag] -> ShowS
$cshowList :: [KSPFlag] -> ShowS
show :: KSPFlag -> String
$cshow :: KSPFlag -> String
showsPrec :: Int -> KSPFlag -> ShowS
$cshowsPrec :: Int -> 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 a ann. Pretty a => a -> Doc ann
pretty String
"no-modify"
pretty (KSPOther Int
o) =
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 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 -> DataType
KeyFlag -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KeyFlag -> m KeyFlag
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KeyFlag -> m KeyFlag
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> KeyFlag -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> KeyFlag -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> KeyFlag -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> KeyFlag -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KeyFlag -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KeyFlag -> r
gmapT :: (forall b. Data b => b -> b) -> KeyFlag -> KeyFlag
$cgmapT :: (forall b. Data b => b -> b) -> KeyFlag -> KeyFlag
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KeyFlag)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KeyFlag)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KeyFlag)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KeyFlag)
dataTypeOf :: KeyFlag -> DataType
$cdataTypeOf :: KeyFlag -> DataType
toConstr :: KeyFlag -> Constr
$ctoConstr :: KeyFlag -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KeyFlag
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KeyFlag
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KeyFlag -> c KeyFlag
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KeyFlag -> c 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
$cto :: forall x. Rep KeyFlag x -> KeyFlag
$cfrom :: forall x. KeyFlag -> Rep KeyFlag x
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
showList :: [KeyFlag] -> ShowS
$cshowList :: [KeyFlag] -> ShowS
show :: KeyFlag -> String
$cshow :: KeyFlag -> String
showsPrec :: Int -> KeyFlag -> ShowS
$cshowsPrec :: Int -> 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 a ann. Pretty a => a -> Doc ann
pretty String
"group"
pretty KeyFlag
AuthKey = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"auth"
pretty KeyFlag
SplitKey = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"split"
pretty KeyFlag
EncryptStorageKey = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"encrypt-storage"
pretty KeyFlag
EncryptCommunicationsKey = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"encrypt-communications"
pretty KeyFlag
SignDataKey = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"sign-data"
pretty KeyFlag
CertifyKeysKey = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"certify-keys"
pretty (KFOther Int
o) = 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 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 -> DataType
RevocationCode -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RevocationCode -> m RevocationCode
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RevocationCode -> m RevocationCode
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> RevocationCode -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> RevocationCode -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> RevocationCode -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> RevocationCode -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationCode -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RevocationCode -> r
gmapT :: (forall b. Data b => b -> b) -> RevocationCode -> RevocationCode
$cgmapT :: (forall b. Data b => b -> b) -> RevocationCode -> RevocationCode
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RevocationCode)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RevocationCode)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RevocationCode)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RevocationCode)
dataTypeOf :: RevocationCode -> DataType
$cdataTypeOf :: RevocationCode -> DataType
toConstr :: RevocationCode -> Constr
$ctoConstr :: RevocationCode -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RevocationCode
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RevocationCode
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RevocationCode -> c RevocationCode
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RevocationCode -> c 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
$cto :: forall x. Rep RevocationCode x -> RevocationCode
$cfrom :: forall x. RevocationCode -> Rep RevocationCode x
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
showList :: [RevocationCode] -> ShowS
$cshowList :: [RevocationCode] -> ShowS
show :: RevocationCode -> String
$cshow :: RevocationCode -> String
showsPrec :: Int -> RevocationCode -> ShowS
$cshowsPrec :: Int -> 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 a ann. Pretty a => a -> Doc ann
pretty String
"no reason"
pretty RevocationCode
KeySuperseded = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"key superseded"
pretty RevocationCode
KeyMaterialCompromised = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"key material compromised"
pretty RevocationCode
KeyRetiredAndNoLongerUsed = 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 a ann. Pretty a => a -> Doc ann
pretty String
"user-ID info no longer valid"
pretty (RCoOther Word8
o) = 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 a ann. Pretty a => a -> Doc ann
pretty Word8
o
$(ATH.deriveJSON ATH.defaultOptions ''RevocationCode)
data FeatureFlag
= ModificationDetection
| 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 -> DataType
FeatureFlag -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> FeatureFlag -> m FeatureFlag
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> FeatureFlag -> m FeatureFlag
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> FeatureFlag -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> FeatureFlag -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> FeatureFlag -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> FeatureFlag -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FeatureFlag -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FeatureFlag -> r
gmapT :: (forall b. Data b => b -> b) -> FeatureFlag -> FeatureFlag
$cgmapT :: (forall b. Data b => b -> b) -> FeatureFlag -> FeatureFlag
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c FeatureFlag)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c FeatureFlag)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c FeatureFlag)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c FeatureFlag)
dataTypeOf :: FeatureFlag -> DataType
$cdataTypeOf :: FeatureFlag -> DataType
toConstr :: FeatureFlag -> Constr
$ctoConstr :: FeatureFlag -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FeatureFlag
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FeatureFlag
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FeatureFlag -> c FeatureFlag
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FeatureFlag -> c 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
$cto :: forall x. Rep FeatureFlag x -> FeatureFlag
$cfrom :: forall x. FeatureFlag -> Rep FeatureFlag x
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
showList :: [FeatureFlag] -> ShowS
$cshowList :: [FeatureFlag] -> ShowS
show :: FeatureFlag -> String
$cshow :: FeatureFlag -> String
showsPrec :: Int -> FeatureFlag -> ShowS
$cshowsPrec :: Int -> 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
ModificationDetection = Int
7
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
ModificationDetection
toFFlag Int
i = Int -> FeatureFlag
FeatureOther (Int -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
i)
instance Hashable FeatureFlag
#if !MIN_VERSION_hashable(1,3,4)
instance Hashable a => Hashable (Set a) where
hashWithSalt salt = hashWithSalt salt . Set.toList
#endif
instance Pretty FeatureFlag where
pretty :: forall ann. FeatureFlag -> Doc ann
pretty FeatureFlag
ModificationDetection = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"modification-detection"
pretty (FeatureOther Int
o) = 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 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 -> DataType
URL -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> URL -> m URL
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> URL -> m URL
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> URL -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> URL -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> URL -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> URL -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> URL -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> URL -> r
gmapT :: (forall b. Data b => b -> b) -> URL -> URL
$cgmapT :: (forall b. Data b => b -> b) -> URL -> URL
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c URL)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c URL)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c URL)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c URL)
dataTypeOf :: URL -> DataType
$cdataTypeOf :: URL -> DataType
toConstr :: URL -> Constr
$ctoConstr :: URL -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c URL
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c URL
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> URL -> c URL
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> URL -> c URL
Data, URL -> URL -> Bool
(URL -> URL -> Bool) -> (URL -> URL -> Bool) -> Eq URL
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: URL -> URL -> Bool
$c/= :: URL -> URL -> Bool
== :: URL -> URL -> Bool
$c== :: 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
$cto :: forall x. Rep URL x -> URL
$cfrom :: forall x. URL -> Rep URL x
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
min :: URL -> URL -> URL
$cmin :: URL -> URL -> URL
max :: URL -> URL -> URL
$cmax :: URL -> URL -> URL
>= :: URL -> URL -> Bool
$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
compare :: URL -> URL -> Ordering
$ccompare :: URL -> URL -> Ordering
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
showList :: [URL] -> ShowS
$cshowList :: [URL] -> ShowS
show :: URL -> String
$cshow :: URL -> String
showsPrec :: Int -> URL -> ShowS
$cshowsPrec :: Int -> 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 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
key String
"uri" Key -> String -> Pair
forall kv v. (KeyValue 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
key String
"uri"
parseJSON Value
_ = Parser URL
forall (m :: * -> *) a. MonadPlus m => m a
mzero
data SigType
= BinarySig
| CanonicalTextSig
| StandaloneSig
| GenericCert
| PersonaCert
| CasualCert
| PositiveCert
| SubkeyBindingSig
| PrimaryKeyBindingSig
| SignatureDirectlyOnAKey
| 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 -> DataType
SigType -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SigType -> m SigType
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SigType -> m SigType
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SigType -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SigType -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> SigType -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SigType -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigType -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigType -> r
gmapT :: (forall b. Data b => b -> b) -> SigType -> SigType
$cgmapT :: (forall b. Data b => b -> b) -> SigType -> SigType
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SigType)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SigType)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SigType)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SigType)
dataTypeOf :: SigType -> DataType
$cdataTypeOf :: SigType -> DataType
toConstr :: SigType -> Constr
$ctoConstr :: SigType -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigType
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigType
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SigType -> c SigType
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SigType -> c 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
$cto :: forall x. Rep SigType x -> SigType
$cfrom :: forall x. SigType -> Rep SigType x
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
showList :: [SigType] -> ShowS
$cshowList :: [SigType] -> ShowS
show :: SigType -> String
$cshow :: SigType -> String
showsPrec :: Int -> SigType -> ShowS
$cshowsPrec :: Int -> 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
SignatureDirectlyOnAKey = 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
SignatureDirectlyOnAKey
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 a ann. Pretty a => a -> Doc ann
pretty String
"binary"
pretty SigType
CanonicalTextSig = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"canonical-pretty"
pretty SigType
StandaloneSig = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"standalone"
pretty SigType
GenericCert = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"generic"
pretty SigType
PersonaCert = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"persona"
pretty SigType
CasualCert = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"casual"
pretty SigType
PositiveCert = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"positive"
pretty SigType
SubkeyBindingSig = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"subkey-binding"
pretty SigType
PrimaryKeyBindingSig = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"primary-key-binding"
pretty SigType
SignatureDirectlyOnAKey = 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 a ann. Pretty a => a -> Doc ann
pretty String
"key-revocation"
pretty SigType
SubkeyRevocationSig = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"subkey-revocation"
pretty SigType
CertRevocationSig = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"cert-revocation"
pretty SigType
TimestampSig = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"timestamp"
pretty SigType
ThirdPartyConfirmationSig = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"third-party-confirmation"
pretty (OtherSig Word8
o) = 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 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 -> DataType
MPI -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> MPI -> m MPI
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> MPI -> m MPI
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> MPI -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> MPI -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> MPI -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> MPI -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MPI -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MPI -> r
gmapT :: (forall b. Data b => b -> b) -> MPI -> MPI
$cgmapT :: (forall b. Data b => b -> b) -> MPI -> MPI
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MPI)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MPI)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MPI)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MPI)
dataTypeOf :: MPI -> DataType
$cdataTypeOf :: MPI -> DataType
toConstr :: MPI -> Constr
$ctoConstr :: MPI -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MPI
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MPI
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MPI -> c MPI
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MPI -> c MPI
Data, MPI -> MPI -> Bool
(MPI -> MPI -> Bool) -> (MPI -> MPI -> Bool) -> Eq MPI
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MPI -> MPI -> Bool
$c/= :: MPI -> MPI -> Bool
== :: MPI -> MPI -> Bool
$c== :: 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
$cto :: forall x. Rep MPI x -> MPI
$cfrom :: forall x. MPI -> Rep MPI x
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
showList :: [MPI] -> ShowS
$cshowList :: [MPI] -> ShowS
show :: MPI -> String
$cshow :: MPI -> String
showsPrec :: Int -> MPI -> ShowS
$cshowsPrec :: Int -> MPI -> ShowS
Show, Typeable)
instance Wrapped MPI
instance Hashable MPI
instance Pretty MPI where
pretty :: forall ann. MPI -> Doc ann
pretty = 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)
data SignaturePayload
= SigV3
SigType
ThirtyTwoBitTimeStamp
EightOctetKeyId
PubKeyAlgorithm
HashAlgorithm
Word16
(NonEmpty MPI)
| SigV4
SigType
PubKeyAlgorithm
HashAlgorithm
[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 -> DataType
SignaturePayload -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SignaturePayload -> m SignaturePayload
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SignaturePayload -> m SignaturePayload
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SignaturePayload -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SignaturePayload -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> SignaturePayload -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SignaturePayload -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SignaturePayload -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SignaturePayload -> r
gmapT :: (forall b. Data b => b -> b)
-> SignaturePayload -> SignaturePayload
$cgmapT :: (forall b. Data b => b -> b)
-> SignaturePayload -> SignaturePayload
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SignaturePayload)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SignaturePayload)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SignaturePayload)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SignaturePayload)
dataTypeOf :: SignaturePayload -> DataType
$cdataTypeOf :: SignaturePayload -> DataType
toConstr :: SignaturePayload -> Constr
$ctoConstr :: SignaturePayload -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SignaturePayload
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SignaturePayload
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SignaturePayload -> c SignaturePayload
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SignaturePayload -> c SignaturePayload
Data, SignaturePayload -> SignaturePayload -> Bool
(SignaturePayload -> SignaturePayload -> Bool)
-> (SignaturePayload -> SignaturePayload -> Bool)
-> Eq SignaturePayload
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SignaturePayload -> SignaturePayload -> Bool
$c/= :: SignaturePayload -> SignaturePayload -> Bool
== :: SignaturePayload -> SignaturePayload -> Bool
$c== :: 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
$cto :: forall x. Rep SignaturePayload x -> SignaturePayload
$cfrom :: forall x. SignaturePayload -> Rep SignaturePayload x
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
showList :: [SignaturePayload] -> ShowS
$cshowList :: [SignaturePayload] -> ShowS
show :: SignaturePayload -> String
$cshow :: SignaturePayload -> String
showsPrec :: Int -> SignaturePayload -> ShowS
$cshowsPrec :: Int -> SignaturePayload -> ShowS
Show, Typeable)
instance Hashable SignaturePayload
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 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 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
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
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
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
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
pretty HashAlgorithm
ha Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc 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 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 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 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
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
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
pretty HashAlgorithm
ha Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc 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 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 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 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 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 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 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 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 (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 SigSubPacketPayload
= SigCreationTime ThirtyTwoBitTimeStamp
| SigExpirationTime ThirtyTwoBitDuration
| ExportableCertification Exportability
| TrustSignature TrustLevel TrustAmount
| RegularExpression AlmostPublicDomainRegex
| Revocable Revocability
| KeyExpirationTime ThirtyTwoBitDuration
| PreferredSymmetricAlgorithms [SymmetricAlgorithm]
| RevocationKey (Set RevocationClass) PubKeyAlgorithm TwentyOctetFingerprint
| 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 Word8 TwentyOctetFingerprint
| 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 -> DataType
SigSubPacketPayload -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SigSubPacketPayload -> m SigSubPacketPayload
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SigSubPacketPayload -> m SigSubPacketPayload
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SigSubPacketPayload -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SigSubPacketPayload -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> SigSubPacketPayload -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> SigSubPacketPayload -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigSubPacketPayload -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigSubPacketPayload -> r
gmapT :: (forall b. Data b => b -> b)
-> SigSubPacketPayload -> SigSubPacketPayload
$cgmapT :: (forall b. Data b => b -> b)
-> SigSubPacketPayload -> SigSubPacketPayload
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SigSubPacketPayload)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SigSubPacketPayload)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SigSubPacketPayload)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SigSubPacketPayload)
dataTypeOf :: SigSubPacketPayload -> DataType
$cdataTypeOf :: SigSubPacketPayload -> DataType
toConstr :: SigSubPacketPayload -> Constr
$ctoConstr :: SigSubPacketPayload -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigSubPacketPayload
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigSubPacketPayload
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SigSubPacketPayload
-> c SigSubPacketPayload
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SigSubPacketPayload
-> c SigSubPacketPayload
Data, SigSubPacketPayload -> SigSubPacketPayload -> Bool
(SigSubPacketPayload -> SigSubPacketPayload -> Bool)
-> (SigSubPacketPayload -> SigSubPacketPayload -> Bool)
-> Eq SigSubPacketPayload
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SigSubPacketPayload -> SigSubPacketPayload -> Bool
$c/= :: SigSubPacketPayload -> SigSubPacketPayload -> Bool
== :: SigSubPacketPayload -> SigSubPacketPayload -> Bool
$c== :: 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
$cto :: forall x. Rep SigSubPacketPayload x -> SigSubPacketPayload
$cfrom :: forall x. SigSubPacketPayload -> Rep SigSubPacketPayload x
Generic, 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
showList :: [SigSubPacketPayload] -> ShowS
$cshowList :: [SigSubPacketPayload] -> ShowS
show :: SigSubPacketPayload -> String
$cshow :: SigSubPacketPayload -> String
showsPrec :: Int -> SigSubPacketPayload -> ShowS
$cshowsPrec :: Int -> 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 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
pretty ThirtyTwoBitTimeStamp
ts
pretty (SigExpirationTime ThirtyTwoBitDuration
d) = 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
pretty ThirtyTwoBitDuration
d
pretty (ExportableCertification Bool
e) =
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
<+> Bool -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Bool
e
pretty (TrustSignature Word8
tl Word8
ta) =
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
<+> Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
tl Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
ta
pretty (RegularExpression ByteString
apdre) =
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 Bool
r) = 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
<+> Bool -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Bool
r
pretty (KeyExpirationTime ThirtyTwoBitDuration
d) = 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
pretty ThirtyTwoBitDuration
d
pretty (PreferredSymmetricAlgorithms [SymmetricAlgorithm]
sas) =
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 a ann. Pretty a => a -> Doc ann
pretty [SymmetricAlgorithm]
sas
pretty (RevocationKey Set RevocationClass
rcs PubKeyAlgorithm
pka TwentyOctetFingerprint
tof) =
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 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
pretty PubKeyAlgorithm
pka Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> TwentyOctetFingerprint -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty TwentyOctetFingerprint
tof
pretty (Issuer EightOctetKeyId
eoki) = 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
pretty EightOctetKeyId
eoki
pretty (NotationData Set NotationFlag
nfs NotationName
nn NotationValue
nv) =
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 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
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
pretty NotationValue
nv
pretty (PreferredHashAlgorithms [HashAlgorithm]
phas) =
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 a ann. Pretty a => a -> Doc ann
pretty [HashAlgorithm]
phas
pretty (PreferredCompressionAlgorithms [CompressionAlgorithm]
pcas) =
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 a ann. Pretty a => a -> Doc ann
pretty [CompressionAlgorithm]
pcas
pretty (KeyServerPreferences Set KSPFlag
kspfs) =
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 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 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 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 a ann. Pretty a => a -> Doc ann
pretty String
"primary user-ID"
pretty (PolicyURL URL
u) = 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
pretty URL
u
pretty (KeyFlags Set KeyFlag
kfs) = 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 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 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 a ann. Pretty a => a -> Doc ann
pretty Text
u
pretty (ReasonForRevocation RevocationCode
rc Text
rr) =
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
pretty RevocationCode
rc Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Text -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Text
rr
pretty (Features Set FeatureFlag
ffs) = 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 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 ByteString
sh) =
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
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
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
prettyLBS ByteString
sh
pretty (EmbeddedSignature SignaturePayload
sp) = 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
pretty SignaturePayload
sp
pretty (IssuerFingerprint Word8
kv TwentyOctetFingerprint
ifp) =
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
<> Word8 -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Word8
kv Doc ann -> Doc ann -> Doc ann
forall a. Semigroup a => a -> a -> a
<> 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
<+> TwentyOctetFingerprint -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty TwentyOctetFingerprint
ifp
pretty (UserDefinedSigSub Word8
t ByteString
bs) =
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 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 a ann. Pretty a => a -> Doc ann
pretty (ByteString -> [Word8]
BL.unpack ByteString
bs)
pretty (OtherSigSub Word8
t ByteString
bs) =
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 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
key String
"sigCreationTime" Key -> ThirtyTwoBitTimeStamp -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= ThirtyTwoBitTimeStamp
ts]
toJSON (SigExpirationTime ThirtyTwoBitDuration
d) = [Pair] -> Value
object [String -> Key
key String
"sigExpirationTime" Key -> ThirtyTwoBitDuration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= ThirtyTwoBitDuration
d]
toJSON (ExportableCertification Bool
e) =
[Pair] -> Value
object [String -> Key
key String
"exportableCertification" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Bool
e]
toJSON (TrustSignature Word8
tl Word8
ta) = [Pair] -> Value
object [String -> Key
key String
"trustSignature" Key -> (Word8, Word8) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= (Word8
tl, Word8
ta)]
toJSON (RegularExpression ByteString
apdre) =
[Pair] -> Value
object [String -> Key
key String
"regularExpression" Key -> [Word8] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= ByteString -> [Word8]
BL.unpack ByteString
apdre]
toJSON (Revocable Bool
r) = [Pair] -> Value
object [String -> Key
key String
"revocable" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Bool
r]
toJSON (KeyExpirationTime ThirtyTwoBitDuration
d) = [Pair] -> Value
object [String -> Key
key String
"keyExpirationTime" Key -> ThirtyTwoBitDuration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= ThirtyTwoBitDuration
d]
toJSON (PreferredSymmetricAlgorithms [SymmetricAlgorithm]
sas) =
[Pair] -> Value
object [String -> Key
key String
"preferredSymmetricAlgorithms" Key -> [SymmetricAlgorithm] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [SymmetricAlgorithm]
sas]
toJSON (RevocationKey Set RevocationClass
rcs PubKeyAlgorithm
pka TwentyOctetFingerprint
tof) =
[Pair] -> Value
object [String -> Key
key String
"revocationKey" Key
-> (Set RevocationClass, PubKeyAlgorithm, TwentyOctetFingerprint)
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= (Set RevocationClass
rcs, PubKeyAlgorithm
pka, TwentyOctetFingerprint
tof)]
toJSON (Issuer EightOctetKeyId
eoki) = [Pair] -> Value
object [String -> Key
key String
"issuer" Key -> EightOctetKeyId -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= EightOctetKeyId
eoki]
toJSON (NotationData Set NotationFlag
nfs (NotationName ByteString
nn) (NotationValue ByteString
nv)) =
[Pair] -> Value
object [String -> Key
key String
"notationData" Key -> (Set NotationFlag, [Word8], [Word8]) -> Pair
forall kv v. (KeyValue 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
key String
"preferredHashAlgorithms" Key -> [HashAlgorithm] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [HashAlgorithm]
phas]
toJSON (PreferredCompressionAlgorithms [CompressionAlgorithm]
pcas) =
[Pair] -> Value
object [String -> Key
key String
"preferredCompressionAlgorithms" Key -> [CompressionAlgorithm] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [CompressionAlgorithm]
pcas]
toJSON (KeyServerPreferences Set KSPFlag
kspfs) =
[Pair] -> Value
object [String -> Key
key String
"keyServerPreferences" Key -> Set KSPFlag -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Set KSPFlag
kspfs]
toJSON (PreferredKeyServer ByteString
ks) =
[Pair] -> Value
object [String -> Key
key String
"preferredKeyServer" Key -> String -> Pair
forall kv v. (KeyValue 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
key String
"primaryUserId" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Bool
p]
toJSON (PolicyURL URL
u) = [Pair] -> Value
object [String -> Key
key String
"policyURL" Key -> URL -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= URL
u]
toJSON (KeyFlags Set KeyFlag
kfs) = [Pair] -> Value
object [String -> Key
key String
"keyFlags" Key -> Set KeyFlag -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Set KeyFlag
kfs]
toJSON (SignersUserId Text
u) = [Pair] -> Value
object [String -> Key
key String
"signersUserId" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
u]
toJSON (ReasonForRevocation RevocationCode
rc Text
rr) =
[Pair] -> Value
object [String -> Key
key String
"reasonForRevocation" Key -> (RevocationCode, Text) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= (RevocationCode
rc, Text
rr)]
toJSON (Features Set FeatureFlag
ffs) = [Pair] -> Value
object [String -> Key
key String
"features" Key -> Set FeatureFlag -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Set FeatureFlag
ffs]
toJSON (SignatureTarget PubKeyAlgorithm
pka HashAlgorithm
ha ByteString
sh) =
[Pair] -> Value
object [String -> Key
key String
"signatureTarget" Key -> (PubKeyAlgorithm, HashAlgorithm, [Word8]) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= (PubKeyAlgorithm
pka, HashAlgorithm
ha, ByteString -> [Word8]
BL.unpack ByteString
sh)]
toJSON (EmbeddedSignature SignaturePayload
sp) = [Pair] -> Value
object [String -> Key
key String
"embeddedSignature" Key -> SignaturePayload -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= SignaturePayload
sp]
toJSON (IssuerFingerprint Word8
kv TwentyOctetFingerprint
ifp) =
[Pair] -> Value
object [String -> Key
key String
"issuerFingerprint" Key -> (Word8, TwentyOctetFingerprint) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= (Word8
kv, TwentyOctetFingerprint
ifp)]
toJSON (UserDefinedSigSub Word8
t ByteString
bs) =
[Pair] -> Value
object [String -> Key
key String
"userDefinedSigSub" Key -> (Word8, [Word8]) -> Pair
forall kv v. (KeyValue 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
key String
"otherSigSub" Key -> (Word8, [Word8]) -> Pair
forall kv v. (KeyValue 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
key String
"sigCreationTime") Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
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
key String
"sigExpirationTime") Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|>
(Bool -> SigSubPacketPayload
ExportableCertification (Bool -> SigSubPacketPayload)
-> Parser Bool -> Parser SigSubPacketPayload
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
key String
"exportableCertification") Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|>
((Word8 -> Word8 -> SigSubPacketPayload)
-> (Word8, Word8) -> SigSubPacketPayload
forall a b c. (a -> b -> c) -> (a, b) -> c
uncurry Word8 -> Word8 -> SigSubPacketPayload
TrustSignature ((Word8, Word8) -> SigSubPacketPayload)
-> Parser (Word8, Word8) -> Parser SigSubPacketPayload
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser (Word8, Word8)
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
key String
"trustSignature") Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
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
key String
"regularExpression") Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|>
(Bool -> SigSubPacketPayload
Revocable (Bool -> SigSubPacketPayload)
-> Parser Bool -> Parser SigSubPacketPayload
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
key String
"revocable") Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
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
key String
"keyExpirationTime") Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
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
key String
"preferredSymmetricAlgorithms") Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|>
((Set RevocationClass
-> PubKeyAlgorithm
-> TwentyOctetFingerprint
-> SigSubPacketPayload)
-> (Set RevocationClass, PubKeyAlgorithm, TwentyOctetFingerprint)
-> SigSubPacketPayload
forall a b c d. (a -> b -> c -> d) -> (a, b, c) -> d
uc3 Set RevocationClass
-> PubKeyAlgorithm -> TwentyOctetFingerprint -> SigSubPacketPayload
RevocationKey ((Set RevocationClass, PubKeyAlgorithm, TwentyOctetFingerprint)
-> SigSubPacketPayload)
-> Parser
(Set RevocationClass, PubKeyAlgorithm, TwentyOctetFingerprint)
-> Parser SigSubPacketPayload
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
v Object
-> Key
-> Parser
(Set RevocationClass, PubKeyAlgorithm, TwentyOctetFingerprint)
forall a. FromJSON a => Object -> Key -> Parser a
A..: String -> Key
key String
"revocationKey") Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
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
key String
"issuer") Parser SigSubPacketPayload
-> Parser SigSubPacketPayload -> Parser SigSubPacketPayload
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
key String
"notationData")
parseJSON Value
_ = Parser SigSubPacketPayload
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 -> DataType
SigSubPacket -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SigSubPacket -> m SigSubPacket
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SigSubPacket -> m SigSubPacket
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SigSubPacket -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SigSubPacket -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> SigSubPacket -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SigSubPacket -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigSubPacket -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigSubPacket -> r
gmapT :: (forall b. Data b => b -> b) -> SigSubPacket -> SigSubPacket
$cgmapT :: (forall b. Data b => b -> b) -> SigSubPacket -> SigSubPacket
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SigSubPacket)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SigSubPacket)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SigSubPacket)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SigSubPacket)
dataTypeOf :: SigSubPacket -> DataType
$cdataTypeOf :: SigSubPacket -> DataType
toConstr :: SigSubPacket -> Constr
$ctoConstr :: SigSubPacket -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigSubPacket
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigSubPacket
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SigSubPacket -> c SigSubPacket
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SigSubPacket -> c SigSubPacket
Data, SigSubPacket -> SigSubPacket -> Bool
(SigSubPacket -> SigSubPacket -> Bool)
-> (SigSubPacket -> SigSubPacket -> Bool) -> Eq SigSubPacket
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SigSubPacket -> SigSubPacket -> Bool
$c/= :: SigSubPacket -> SigSubPacket -> Bool
== :: SigSubPacket -> SigSubPacket -> Bool
$c== :: 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
$cto :: forall x. Rep SigSubPacket x -> SigSubPacket
$cfrom :: forall x. SigSubPacket -> Rep SigSubPacket x
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
showList :: [SigSubPacket] -> ShowS
$cshowList :: [SigSubPacket] -> ShowS
show :: SigSubPacket -> String
$cshow :: SigSubPacket -> String
showsPrec :: Int -> SigSubPacket -> ShowS
$cshowsPrec :: Int -> SigSubPacket -> ShowS
Show, Typeable)
instance Pretty SigSubPacket where
pretty :: forall ann. SigSubPacket -> Doc ann
pretty SigSubPacket
x =
(if SigSubPacket -> Bool
_sspCriticality SigSubPacket
x
then 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
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)
data KeyVersion
= DeprecatedV3
| V4
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 -> DataType
KeyVersion -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KeyVersion -> m KeyVersion
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> KeyVersion -> m KeyVersion
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> KeyVersion -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> KeyVersion -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> KeyVersion -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> KeyVersion -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KeyVersion -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> KeyVersion -> r
gmapT :: (forall b. Data b => b -> b) -> KeyVersion -> KeyVersion
$cgmapT :: (forall b. Data b => b -> b) -> KeyVersion -> KeyVersion
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KeyVersion)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KeyVersion)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KeyVersion)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c KeyVersion)
dataTypeOf :: KeyVersion -> DataType
$cdataTypeOf :: KeyVersion -> DataType
toConstr :: KeyVersion -> Constr
$ctoConstr :: KeyVersion -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KeyVersion
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c KeyVersion
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KeyVersion -> c KeyVersion
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> KeyVersion -> c KeyVersion
Data, KeyVersion -> KeyVersion -> Bool
(KeyVersion -> KeyVersion -> Bool)
-> (KeyVersion -> KeyVersion -> Bool) -> Eq KeyVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KeyVersion -> KeyVersion -> Bool
$c/= :: KeyVersion -> KeyVersion -> Bool
== :: KeyVersion -> KeyVersion -> Bool
$c== :: 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
$cto :: forall x. Rep KeyVersion x -> KeyVersion
$cfrom :: forall x. KeyVersion -> Rep KeyVersion x
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
min :: KeyVersion -> KeyVersion -> KeyVersion
$cmin :: KeyVersion -> KeyVersion -> KeyVersion
max :: KeyVersion -> KeyVersion -> KeyVersion
$cmax :: KeyVersion -> KeyVersion -> KeyVersion
>= :: KeyVersion -> KeyVersion -> Bool
$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
compare :: KeyVersion -> KeyVersion -> Ordering
$ccompare :: KeyVersion -> KeyVersion -> Ordering
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
showList :: [KeyVersion] -> ShowS
$cshowList :: [KeyVersion] -> ShowS
show :: KeyVersion -> String
$cshow :: KeyVersion -> String
showsPrec :: Int -> KeyVersion -> ShowS
$cshowsPrec :: Int -> KeyVersion -> ShowS
Show, Typeable)
instance Hashable KeyVersion
instance Pretty KeyVersion where
pretty :: forall ann. KeyVersion -> Doc ann
pretty KeyVersion
DeprecatedV3 = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"(deprecated) v3"
pretty KeyVersion
V4 = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"v4"
$(ATH.deriveJSON ATH.defaultOptions ''KeyVersion)
newtype IV =
IV
{ IV -> ByteString
unIV :: B.ByteString
}
deriving ( 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
copyByteArrayToPtr :: forall p. IV -> Ptr p -> IO ()
$ccopyByteArrayToPtr :: forall p. IV -> Ptr p -> IO ()
withByteArray :: forall p a. IV -> (Ptr p -> IO a) -> IO a
$cwithByteArray :: forall p a. IV -> (Ptr p -> IO a) -> IO a
length :: IV -> Int
$clength :: IV -> Int
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 -> DataType
IV -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> IV -> m IV
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> IV -> m IV
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> IV -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> IV -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> IV -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> IV -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IV -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IV -> r
gmapT :: (forall b. Data b => b -> b) -> IV -> IV
$cgmapT :: (forall b. Data b => b -> b) -> IV -> IV
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IV)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IV)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IV)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IV)
dataTypeOf :: IV -> DataType
$cdataTypeOf :: IV -> DataType
toConstr :: IV -> Constr
$ctoConstr :: IV -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IV
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IV
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IV -> c IV
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IV -> c IV
Data
, IV -> IV -> Bool
(IV -> IV -> Bool) -> (IV -> IV -> Bool) -> Eq IV
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IV -> IV -> Bool
$c/= :: IV -> IV -> Bool
== :: IV -> IV -> Bool
$c== :: 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
$cto :: forall x. Rep IV x -> IV
$cfrom :: forall x. IV -> Rep IV x
Generic
, Int -> IV -> Int
IV -> Int
(Int -> IV -> Int) -> (IV -> Int) -> Hashable IV
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: IV -> Int
$chash :: IV -> Int
hashWithSalt :: Int -> IV -> Int
$chashWithSalt :: Int -> IV -> Int
Hashable
, 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
stimes :: forall b. Integral b => b -> IV -> IV
$cstimes :: forall b. Integral b => b -> IV -> IV
sconcat :: NonEmpty IV -> IV
$csconcat :: NonEmpty IV -> IV
<> :: IV -> IV -> IV
$c<> :: IV -> IV -> IV
Semigroup
, 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
mconcat :: [IV] -> IV
$cmconcat :: [IV] -> IV
mappend :: IV -> IV -> IV
$cmappend :: IV -> IV -> IV
mempty :: IV
$cmempty :: IV
Monoid
, 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
showList :: [IV] -> ShowS
$cshowList :: [IV] -> ShowS
show :: IV -> String
$cshow :: IV -> String
showsPrec :: Int -> IV -> ShowS
$cshowsPrec :: Int -> IV -> ShowS
Show
, Typeable
)
instance Wrapped IV
instance Pretty IV where
pretty :: forall ann. IV -> Doc ann
pretty = 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
. ByteString -> ByteString
BL.fromStrict (ByteString -> ByteString)
-> (IV -> ByteString) -> IV -> ByteString
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 DataType
= BinaryData
| TextData
| UTF8Data
| OtherData Word8
deriving (Int -> DataType -> ShowS
[DataType] -> ShowS
DataType -> String
(Int -> DataType -> ShowS)
-> (DataType -> String) -> ([DataType] -> ShowS) -> Show DataType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DataType] -> ShowS
$cshowList :: [DataType] -> ShowS
show :: DataType -> String
$cshow :: DataType -> String
showsPrec :: Int -> DataType -> ShowS
$cshowsPrec :: Int -> DataType -> ShowS
Show, Typeable DataType
Typeable DataType
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DataType -> c DataType)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DataType)
-> (DataType -> Constr)
-> (DataType -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DataType))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DataType))
-> ((forall b. Data b => b -> b) -> DataType -> DataType)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DataType -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DataType -> r)
-> (forall u. (forall d. Data d => d -> u) -> DataType -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> DataType -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DataType -> m DataType)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DataType -> m DataType)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DataType -> m DataType)
-> Data DataType
DataType -> DataType
DataType -> Constr
(forall b. Data b => b -> b) -> DataType -> DataType
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) -> DataType -> u
forall u. (forall d. Data d => d -> u) -> DataType -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DataType -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DataType -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DataType -> m DataType
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DataType -> m DataType
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DataType
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DataType -> c DataType
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DataType)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DataType)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DataType -> m DataType
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DataType -> m DataType
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DataType -> m DataType
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DataType -> m DataType
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DataType -> m DataType
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DataType -> m DataType
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> DataType -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> DataType -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> DataType -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> DataType -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DataType -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DataType -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DataType -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DataType -> r
gmapT :: (forall b. Data b => b -> b) -> DataType -> DataType
$cgmapT :: (forall b. Data b => b -> b) -> DataType -> DataType
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DataType)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DataType)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DataType)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DataType)
dataTypeOf :: DataType -> DataType
$cdataTypeOf :: DataType -> DataType
toConstr :: DataType -> Constr
$ctoConstr :: DataType -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DataType
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DataType
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DataType -> c DataType
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DataType -> c DataType
Data, (forall x. DataType -> Rep DataType x)
-> (forall x. Rep DataType x -> DataType) -> Generic DataType
forall x. Rep DataType x -> DataType
forall x. DataType -> Rep DataType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DataType x -> DataType
$cfrom :: forall x. DataType -> Rep DataType x
Generic, Typeable)
instance Hashable DataType
instance Eq DataType where
== :: DataType -> DataType -> Bool
(==) DataType
a DataType
b = DataType -> Word8
forall a. FutureVal a => a -> Word8
fromFVal DataType
a Word8 -> Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== DataType -> Word8
forall a. FutureVal a => a -> Word8
fromFVal DataType
b
instance Ord DataType where
compare :: DataType -> DataType -> Ordering
compare = (DataType -> Word8) -> DataType -> DataType -> Ordering
forall a b. Ord a => (b -> a) -> b -> b -> Ordering
comparing DataType -> Word8
forall a. FutureVal a => a -> Word8
fromFVal
instance FutureVal DataType where
fromFVal :: DataType -> Word8
fromFVal DataType
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 DataType
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 DataType
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 -> DataType
toFVal Word8
0x62 = DataType
BinaryData
toFVal Word8
0x74 = DataType
TextData
toFVal Word8
0x75 = DataType
UTF8Data
toFVal Word8
o = Word8 -> DataType
OtherData Word8
o
instance Pretty DataType where
pretty :: forall ann. DataType -> Doc ann
pretty DataType
BinaryData = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"binary"
pretty DataType
TextData = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"text"
pretty DataType
UTF8Data = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"UTF-8"
pretty (OtherData Word8
o) = 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 a ann. Pretty a => a -> Doc ann
pretty Word8
o
$(ATH.deriveJSON ATH.defaultOptions ''DataType)
newtype Salt =
Salt
{ Salt -> ByteString
unSalt :: B.ByteString
}
deriving (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 -> DataType
Salt -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Salt -> m Salt
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Salt -> m Salt
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Salt -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Salt -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> Salt -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Salt -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Salt -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Salt -> r
gmapT :: (forall b. Data b => b -> b) -> Salt -> Salt
$cgmapT :: (forall b. Data b => b -> b) -> Salt -> Salt
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Salt)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Salt)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Salt)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Salt)
dataTypeOf :: Salt -> DataType
$cdataTypeOf :: Salt -> DataType
toConstr :: Salt -> Constr
$ctoConstr :: Salt -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Salt
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Salt
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Salt -> c Salt
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Salt -> c Salt
Data, Salt -> Salt -> Bool
(Salt -> Salt -> Bool) -> (Salt -> Salt -> Bool) -> Eq Salt
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Salt -> Salt -> Bool
$c/= :: Salt -> Salt -> Bool
== :: Salt -> Salt -> Bool
$c== :: 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
$cto :: forall x. Rep Salt x -> Salt
$cfrom :: forall x. Salt -> Rep Salt x
Generic, Int -> Salt -> Int
Salt -> Int
(Int -> Salt -> Int) -> (Salt -> Int) -> Hashable Salt
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: Salt -> Int
$chash :: Salt -> Int
hashWithSalt :: Int -> Salt -> Int
$chashWithSalt :: Int -> Salt -> Int
Hashable, 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
showList :: [Salt] -> ShowS
$cshowList :: [Salt] -> ShowS
show :: Salt -> String
$cshow :: Salt -> String
showsPrec :: Int -> Salt -> ShowS
$cshowsPrec :: Int -> Salt -> ShowS
Show, Typeable)
instance Wrapped Salt
instance Pretty Salt where
pretty :: forall ann. Salt -> Doc ann
pretty = 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
. ByteString -> ByteString
BL.fromStrict (ByteString -> ByteString)
-> (Salt -> ByteString) -> Salt -> ByteString
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 IterationCount =
IterationCount
{ IterationCount -> Int
unIterationCount :: Int
}
deriving ( IterationCount
IterationCount -> IterationCount -> Bounded IterationCount
forall a. a -> a -> Bounded a
maxBound :: IterationCount
$cmaxBound :: IterationCount
minBound :: IterationCount
$cminBound :: 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 -> DataType
IterationCount -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IterationCount -> m IterationCount
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IterationCount -> m IterationCount
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> IterationCount -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> IterationCount -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> IterationCount -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> IterationCount -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IterationCount -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IterationCount -> r
gmapT :: (forall b. Data b => b -> b) -> IterationCount -> IterationCount
$cgmapT :: (forall b. Data b => b -> b) -> IterationCount -> IterationCount
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IterationCount)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IterationCount)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IterationCount)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IterationCount)
dataTypeOf :: IterationCount -> DataType
$cdataTypeOf :: IterationCount -> DataType
toConstr :: IterationCount -> Constr
$ctoConstr :: IterationCount -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IterationCount
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IterationCount
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IterationCount -> c IterationCount
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IterationCount -> c 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
enumFromThenTo :: IterationCount
-> IterationCount -> IterationCount -> [IterationCount]
$cenumFromThenTo :: IterationCount
-> IterationCount -> IterationCount -> [IterationCount]
enumFromTo :: IterationCount -> IterationCount -> [IterationCount]
$cenumFromTo :: IterationCount -> IterationCount -> [IterationCount]
enumFromThen :: IterationCount -> IterationCount -> [IterationCount]
$cenumFromThen :: IterationCount -> IterationCount -> [IterationCount]
enumFrom :: IterationCount -> [IterationCount]
$cenumFrom :: IterationCount -> [IterationCount]
fromEnum :: IterationCount -> Int
$cfromEnum :: IterationCount -> Int
toEnum :: Int -> IterationCount
$ctoEnum :: Int -> IterationCount
pred :: IterationCount -> IterationCount
$cpred :: IterationCount -> IterationCount
succ :: IterationCount -> IterationCount
$csucc :: IterationCount -> IterationCount
Enum
, IterationCount -> IterationCount -> Bool
(IterationCount -> IterationCount -> Bool)
-> (IterationCount -> IterationCount -> Bool) -> Eq IterationCount
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IterationCount -> IterationCount -> Bool
$c/= :: IterationCount -> IterationCount -> Bool
== :: IterationCount -> IterationCount -> Bool
$c== :: 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
$cto :: forall x. Rep IterationCount x -> IterationCount
$cfrom :: forall x. IterationCount -> Rep IterationCount x
Generic
, Int -> IterationCount -> Int
IterationCount -> Int
(Int -> IterationCount -> Int)
-> (IterationCount -> Int) -> Hashable IterationCount
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: IterationCount -> Int
$chash :: IterationCount -> Int
hashWithSalt :: Int -> IterationCount -> Int
$chashWithSalt :: Int -> 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
toInteger :: IterationCount -> Integer
$ctoInteger :: IterationCount -> Integer
divMod :: IterationCount
-> IterationCount -> (IterationCount, IterationCount)
$cdivMod :: IterationCount
-> IterationCount -> (IterationCount, IterationCount)
quotRem :: IterationCount
-> IterationCount -> (IterationCount, IterationCount)
$cquotRem :: IterationCount
-> IterationCount -> (IterationCount, IterationCount)
mod :: IterationCount -> IterationCount -> IterationCount
$cmod :: IterationCount -> IterationCount -> IterationCount
div :: IterationCount -> IterationCount -> IterationCount
$cdiv :: IterationCount -> IterationCount -> IterationCount
rem :: IterationCount -> IterationCount -> IterationCount
$crem :: IterationCount -> IterationCount -> IterationCount
quot :: IterationCount -> IterationCount -> IterationCount
$cquot :: IterationCount -> IterationCount -> IterationCount
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
fromInteger :: Integer -> IterationCount
$cfromInteger :: Integer -> IterationCount
signum :: IterationCount -> IterationCount
$csignum :: IterationCount -> IterationCount
abs :: IterationCount -> IterationCount
$cabs :: IterationCount -> IterationCount
negate :: IterationCount -> IterationCount
$cnegate :: IterationCount -> IterationCount
* :: IterationCount -> IterationCount -> IterationCount
$c* :: IterationCount -> IterationCount -> IterationCount
- :: IterationCount -> IterationCount -> IterationCount
$c- :: IterationCount -> IterationCount -> IterationCount
+ :: IterationCount -> IterationCount -> IterationCount
$c+ :: IterationCount -> IterationCount -> 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
min :: IterationCount -> IterationCount -> IterationCount
$cmin :: IterationCount -> IterationCount -> IterationCount
max :: IterationCount -> IterationCount -> IterationCount
$cmax :: IterationCount -> IterationCount -> IterationCount
>= :: IterationCount -> IterationCount -> Bool
$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
compare :: IterationCount -> IterationCount -> Ordering
$ccompare :: IterationCount -> IterationCount -> Ordering
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
toRational :: IterationCount -> Rational
$ctoRational :: 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
showList :: [IterationCount] -> ShowS
$cshowList :: [IterationCount] -> ShowS
show :: IterationCount -> String
$cshow :: IterationCount -> String
showsPrec :: Int -> IterationCount -> ShowS
$cshowsPrec :: Int -> IterationCount -> ShowS
Show
, Typeable
)
instance Wrapped IterationCount
instance Pretty IterationCount where
pretty :: forall ann. IterationCount -> Doc ann
pretty = 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 Salt
| IteratedSalted HashAlgorithm Salt IterationCount
| 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 -> DataType
S2K -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> S2K -> m S2K
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> S2K -> m S2K
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> S2K -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> S2K -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> S2K -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> S2K -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> S2K -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> S2K -> r
gmapT :: (forall b. Data b => b -> b) -> S2K -> S2K
$cgmapT :: (forall b. Data b => b -> b) -> S2K -> S2K
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c S2K)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c S2K)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c S2K)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c S2K)
dataTypeOf :: S2K -> DataType
$cdataTypeOf :: S2K -> DataType
toConstr :: S2K -> Constr
$ctoConstr :: S2K -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c S2K
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c S2K
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> S2K -> c S2K
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> S2K -> c S2K
Data, S2K -> S2K -> Bool
(S2K -> S2K -> Bool) -> (S2K -> S2K -> Bool) -> Eq S2K
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: S2K -> S2K -> Bool
$c/= :: S2K -> S2K -> Bool
== :: S2K -> S2K -> Bool
$c== :: 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
$cto :: forall x. Rep S2K x -> S2K
$cfrom :: forall x. S2K -> Rep S2K x
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
showList :: [S2K] -> ShowS
$cshowList :: [S2K] -> ShowS
show :: S2K -> String
$cshow :: S2K -> String
showsPrec :: Int -> S2K -> ShowS
$cshowsPrec :: Int -> S2K -> ShowS
Show, Typeable)
instance Hashable S2K
instance Pretty S2K where
pretty :: forall ann. S2K -> Doc ann
pretty (Simple HashAlgorithm
ha) = 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
pretty HashAlgorithm
ha
pretty (Salted HashAlgorithm
ha Salt
salt) = 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
pretty HashAlgorithm
ha Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Salt -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Salt
salt
pretty (IteratedSalted HashAlgorithm
ha Salt
salt IterationCount
icount) =
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
pretty HashAlgorithm
ha Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> Salt -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty Salt
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
pretty IterationCount
icount
pretty (OtherS2K Word8
t ByteString
bs) =
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 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 a ann. Pretty a => a -> Doc ann
pretty (ByteString -> String
bsToHexUpper 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 Salt
salt) = (HashAlgorithm, Salt) -> Value
forall a. ToJSON a => a -> Value
A.toJSON (HashAlgorithm
ha, Salt
salt)
toJSON (IteratedSalted HashAlgorithm
ha Salt
salt IterationCount
icount) = (HashAlgorithm, Salt, IterationCount) -> Value
forall a. ToJSON a => a -> Value
A.toJSON (HashAlgorithm
ha, Salt
salt, IterationCount
icount)
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 -> DataType
ImageFormat -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ImageFormat -> m ImageFormat
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ImageFormat -> m ImageFormat
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ImageFormat -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ImageFormat -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> ImageFormat -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ImageFormat -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ImageFormat -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ImageFormat -> r
gmapT :: (forall b. Data b => b -> b) -> ImageFormat -> ImageFormat
$cgmapT :: (forall b. Data b => b -> b) -> ImageFormat -> ImageFormat
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ImageFormat)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ImageFormat)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ImageFormat)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ImageFormat)
dataTypeOf :: ImageFormat -> DataType
$cdataTypeOf :: ImageFormat -> DataType
toConstr :: ImageFormat -> Constr
$ctoConstr :: ImageFormat -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ImageFormat
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ImageFormat
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ImageFormat -> c ImageFormat
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ImageFormat -> c 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
$cto :: forall x. Rep ImageFormat x -> ImageFormat
$cfrom :: forall x. ImageFormat -> Rep ImageFormat x
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
showList :: [ImageFormat] -> ShowS
$cshowList :: [ImageFormat] -> ShowS
show :: ImageFormat -> String
$cshow :: ImageFormat -> String
showsPrec :: Int -> ImageFormat -> ShowS
$cshowsPrec :: Int -> 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 a ann. Pretty a => a -> Doc ann
pretty String
"JPEG"
pretty (OtherImage Word8
o) = 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 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 -> DataType
ImageHeader -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ImageHeader -> m ImageHeader
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ImageHeader -> m ImageHeader
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ImageHeader -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ImageHeader -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> ImageHeader -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ImageHeader -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ImageHeader -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ImageHeader -> r
gmapT :: (forall b. Data b => b -> b) -> ImageHeader -> ImageHeader
$cgmapT :: (forall b. Data b => b -> b) -> ImageHeader -> ImageHeader
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ImageHeader)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ImageHeader)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ImageHeader)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ImageHeader)
dataTypeOf :: ImageHeader -> DataType
$cdataTypeOf :: ImageHeader -> DataType
toConstr :: ImageHeader -> Constr
$ctoConstr :: ImageHeader -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ImageHeader
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ImageHeader
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ImageHeader -> c ImageHeader
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ImageHeader -> c ImageHeader
Data, ImageHeader -> ImageHeader -> Bool
(ImageHeader -> ImageHeader -> Bool)
-> (ImageHeader -> ImageHeader -> Bool) -> Eq ImageHeader
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImageHeader -> ImageHeader -> Bool
$c/= :: ImageHeader -> ImageHeader -> Bool
== :: ImageHeader -> ImageHeader -> Bool
$c== :: 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
$cto :: forall x. Rep ImageHeader x -> ImageHeader
$cfrom :: forall x. ImageHeader -> Rep ImageHeader x
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
showList :: [ImageHeader] -> ShowS
$cshowList :: [ImageHeader] -> ShowS
show :: ImageHeader -> String
$cshow :: ImageHeader -> String
showsPrec :: Int -> ImageHeader -> ShowS
$cshowsPrec :: Int -> 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 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
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 -> DataType
UserAttrSubPacket -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> UserAttrSubPacket -> m UserAttrSubPacket
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> UserAttrSubPacket -> m UserAttrSubPacket
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> UserAttrSubPacket -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> UserAttrSubPacket -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> UserAttrSubPacket -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> UserAttrSubPacket -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> UserAttrSubPacket -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> UserAttrSubPacket -> r
gmapT :: (forall b. Data b => b -> b)
-> UserAttrSubPacket -> UserAttrSubPacket
$cgmapT :: (forall b. Data b => b -> b)
-> UserAttrSubPacket -> UserAttrSubPacket
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c UserAttrSubPacket)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c UserAttrSubPacket)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c UserAttrSubPacket)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c UserAttrSubPacket)
dataTypeOf :: UserAttrSubPacket -> DataType
$cdataTypeOf :: UserAttrSubPacket -> DataType
toConstr :: UserAttrSubPacket -> Constr
$ctoConstr :: UserAttrSubPacket -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UserAttrSubPacket
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UserAttrSubPacket
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> UserAttrSubPacket -> c UserAttrSubPacket
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> UserAttrSubPacket -> c UserAttrSubPacket
Data, UserAttrSubPacket -> UserAttrSubPacket -> Bool
(UserAttrSubPacket -> UserAttrSubPacket -> Bool)
-> (UserAttrSubPacket -> UserAttrSubPacket -> Bool)
-> Eq UserAttrSubPacket
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UserAttrSubPacket -> UserAttrSubPacket -> Bool
$c/= :: UserAttrSubPacket -> UserAttrSubPacket -> Bool
== :: UserAttrSubPacket -> UserAttrSubPacket -> Bool
$c== :: 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
$cto :: forall x. Rep UserAttrSubPacket x -> UserAttrSubPacket
$cfrom :: forall x. UserAttrSubPacket -> Rep UserAttrSubPacket x
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
showList :: [UserAttrSubPacket] -> ShowS
$cshowList :: [UserAttrSubPacket] -> ShowS
show :: UserAttrSubPacket -> String
$cshow :: UserAttrSubPacket -> String
showsPrec :: Int -> UserAttrSubPacket -> ShowS
$cshowsPrec :: Int -> UserAttrSubPacket -> ShowS
Show, Typeable)
instance Hashable UserAttrSubPacket
instance Ord UserAttrSubPacket where
compare :: UserAttrSubPacket -> UserAttrSubPacket -> Ordering
compare (ImageAttribute ImageHeader
h1 ByteString
d1) (ImageAttribute ImageHeader
h2 ByteString
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
<> ByteString -> ByteString -> Ordering
forall a. Ord a => a -> a -> Ordering
compare ByteString
d1 ByteString
d2
compare (ImageAttribute ImageHeader
_ ByteString
_) (OtherUASub Word8
_ ByteString
_) = Ordering
LT
compare (OtherUASub Word8
_ ByteString
_) (ImageAttribute ImageHeader
_ ByteString
_) = 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 ByteString
d) =
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
pretty ImageHeader
ih Doc ann -> Doc ann -> Doc ann
forall ann. Doc ann -> Doc ann -> Doc ann
<+> [Word8] -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (ByteString -> [Word8]
BL.unpack ByteString
d)
pretty (OtherUASub Word8
t ByteString
bs) =
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 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 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 ByteString
d) = (ImageHeader, [Word8]) -> Value
forall a. ToJSON a => a -> Value
A.toJSON (ImageHeader
ih, ByteString -> [Word8]
BL.unpack ByteString
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
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 -> DataType
ECCCurve -> Constr
(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)
gmapMo :: 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
gmapMp :: forall (m :: * -> *).
MonadPlus 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
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ECCCurve -> m ECCCurve
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ECCCurve -> m ECCCurve
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ECCCurve -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ECCCurve -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> ECCCurve -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ECCCurve -> [u]
gmapQr :: 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
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ECCCurve -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ECCCurve -> r
gmapT :: (forall b. Data b => b -> b) -> ECCCurve -> ECCCurve
$cgmapT :: (forall b. Data b => b -> b) -> ECCCurve -> ECCCurve
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ECCCurve)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ECCCurve)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ECCCurve)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ECCCurve)
dataTypeOf :: ECCCurve -> DataType
$cdataTypeOf :: ECCCurve -> DataType
toConstr :: ECCCurve -> Constr
$ctoConstr :: ECCCurve -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ECCCurve
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ECCCurve
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ECCCurve -> c ECCCurve
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ECCCurve -> c ECCCurve
Data, ECCCurve -> ECCCurve -> Bool
(ECCCurve -> ECCCurve -> Bool)
-> (ECCCurve -> ECCCurve -> Bool) -> Eq ECCCurve
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ECCCurve -> ECCCurve -> Bool
$c/= :: ECCCurve -> ECCCurve -> Bool
== :: ECCCurve -> ECCCurve -> Bool
$c== :: 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
$cto :: forall x. Rep ECCCurve x -> ECCCurve
$cfrom :: forall x. ECCCurve -> Rep ECCCurve x
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
min :: ECCCurve -> ECCCurve -> ECCCurve
$cmin :: ECCCurve -> ECCCurve -> ECCCurve
max :: ECCCurve -> ECCCurve -> ECCCurve
$cmax :: ECCCurve -> ECCCurve -> ECCCurve
>= :: ECCCurve -> ECCCurve -> Bool
$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
compare :: ECCCurve -> ECCCurve -> Ordering
$ccompare :: ECCCurve -> ECCCurve -> Ordering
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
showList :: [ECCCurve] -> ShowS
$cshowList :: [ECCCurve] -> ShowS
show :: ECCCurve -> String
$cshow :: ECCCurve -> String
showsPrec :: Int -> ECCCurve -> ShowS
$cshowsPrec :: Int -> ECCCurve -> ShowS
Show, Typeable)
instance Pretty ECCCurve where
pretty :: forall ann. ECCCurve -> Doc ann
pretty ECCCurve
NISTP256 = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"NIST P-256"
pretty ECCCurve
NISTP384 = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"NIST P-384"
pretty ECCCurve
NISTP521 = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"NIST P-521"
pretty ECCCurve
Curve25519 = String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty String
"Curve25519"
instance Hashable ECCCurve
newtype Block a =
Block
{ forall a. Block a -> [a]
unBlock :: [a]
}
deriving (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
showList :: [Block a] -> ShowS
$cshowList :: forall a. Show a => [Block a] -> ShowS
show :: Block a -> String
$cshow :: forall a. Show a => Block a -> String
showsPrec :: Int -> Block a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> Block a -> ShowS
Show, 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
/= :: Block a -> Block a -> Bool
$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
Eq)