{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE NoImplicitPrelude #-}
module BtcLsp.Grpc.Data
( GRel (..),
SigHeaderName,
TlsCert (..),
TlsKey (..),
TlsData (..),
RawRequestBytes (..),
Encryption (..),
)
where
import BtcLsp.Import.Witch
import Data.Aeson (FromJSON (..), withObject, withText, (.:))
import Text.PrettyPrint.GenericPretty (Out)
import Text.PrettyPrint.GenericPretty.Instance ()
import Universum
import qualified Witch
data GRel
= Client
| Server
newtype RawRequestBytes
= RawRequestBytes ByteString
deriving stock
( RawRequestBytes -> RawRequestBytes -> Bool
(RawRequestBytes -> RawRequestBytes -> Bool)
-> (RawRequestBytes -> RawRequestBytes -> Bool)
-> Eq RawRequestBytes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RawRequestBytes -> RawRequestBytes -> Bool
$c/= :: RawRequestBytes -> RawRequestBytes -> Bool
== :: RawRequestBytes -> RawRequestBytes -> Bool
$c== :: RawRequestBytes -> RawRequestBytes -> Bool
Eq,
Eq RawRequestBytes
Eq RawRequestBytes
-> (RawRequestBytes -> RawRequestBytes -> Ordering)
-> (RawRequestBytes -> RawRequestBytes -> Bool)
-> (RawRequestBytes -> RawRequestBytes -> Bool)
-> (RawRequestBytes -> RawRequestBytes -> Bool)
-> (RawRequestBytes -> RawRequestBytes -> Bool)
-> (RawRequestBytes -> RawRequestBytes -> RawRequestBytes)
-> (RawRequestBytes -> RawRequestBytes -> RawRequestBytes)
-> Ord RawRequestBytes
RawRequestBytes -> RawRequestBytes -> Bool
RawRequestBytes -> RawRequestBytes -> Ordering
RawRequestBytes -> RawRequestBytes -> RawRequestBytes
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 :: RawRequestBytes -> RawRequestBytes -> RawRequestBytes
$cmin :: RawRequestBytes -> RawRequestBytes -> RawRequestBytes
max :: RawRequestBytes -> RawRequestBytes -> RawRequestBytes
$cmax :: RawRequestBytes -> RawRequestBytes -> RawRequestBytes
>= :: RawRequestBytes -> RawRequestBytes -> Bool
$c>= :: RawRequestBytes -> RawRequestBytes -> Bool
> :: RawRequestBytes -> RawRequestBytes -> Bool
$c> :: RawRequestBytes -> RawRequestBytes -> Bool
<= :: RawRequestBytes -> RawRequestBytes -> Bool
$c<= :: RawRequestBytes -> RawRequestBytes -> Bool
< :: RawRequestBytes -> RawRequestBytes -> Bool
$c< :: RawRequestBytes -> RawRequestBytes -> Bool
compare :: RawRequestBytes -> RawRequestBytes -> Ordering
$ccompare :: RawRequestBytes -> RawRequestBytes -> Ordering
Ord,
(forall x. RawRequestBytes -> Rep RawRequestBytes x)
-> (forall x. Rep RawRequestBytes x -> RawRequestBytes)
-> Generic RawRequestBytes
forall x. Rep RawRequestBytes x -> RawRequestBytes
forall x. RawRequestBytes -> Rep RawRequestBytes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RawRequestBytes x -> RawRequestBytes
$cfrom :: forall x. RawRequestBytes -> Rep RawRequestBytes x
Generic
)
instance Out RawRequestBytes
newtype
= Text
deriving newtype
( SigHeaderName -> SigHeaderName -> Bool
(SigHeaderName -> SigHeaderName -> Bool)
-> (SigHeaderName -> SigHeaderName -> Bool) -> Eq SigHeaderName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SigHeaderName -> SigHeaderName -> Bool
$c/= :: SigHeaderName -> SigHeaderName -> Bool
== :: SigHeaderName -> SigHeaderName -> Bool
$c== :: SigHeaderName -> SigHeaderName -> Bool
Eq,
Eq SigHeaderName
Eq SigHeaderName
-> (SigHeaderName -> SigHeaderName -> Ordering)
-> (SigHeaderName -> SigHeaderName -> Bool)
-> (SigHeaderName -> SigHeaderName -> Bool)
-> (SigHeaderName -> SigHeaderName -> Bool)
-> (SigHeaderName -> SigHeaderName -> Bool)
-> (SigHeaderName -> SigHeaderName -> SigHeaderName)
-> (SigHeaderName -> SigHeaderName -> SigHeaderName)
-> Ord SigHeaderName
SigHeaderName -> SigHeaderName -> Bool
SigHeaderName -> SigHeaderName -> Ordering
SigHeaderName -> SigHeaderName -> SigHeaderName
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 :: SigHeaderName -> SigHeaderName -> SigHeaderName
$cmin :: SigHeaderName -> SigHeaderName -> SigHeaderName
max :: SigHeaderName -> SigHeaderName -> SigHeaderName
$cmax :: SigHeaderName -> SigHeaderName -> SigHeaderName
>= :: SigHeaderName -> SigHeaderName -> Bool
$c>= :: SigHeaderName -> SigHeaderName -> Bool
> :: SigHeaderName -> SigHeaderName -> Bool
$c> :: SigHeaderName -> SigHeaderName -> Bool
<= :: SigHeaderName -> SigHeaderName -> Bool
$c<= :: SigHeaderName -> SigHeaderName -> Bool
< :: SigHeaderName -> SigHeaderName -> Bool
$c< :: SigHeaderName -> SigHeaderName -> Bool
compare :: SigHeaderName -> SigHeaderName -> Ordering
$ccompare :: SigHeaderName -> SigHeaderName -> Ordering
Ord,
Int -> SigHeaderName -> ShowS
[SigHeaderName] -> ShowS
SigHeaderName -> String
(Int -> SigHeaderName -> ShowS)
-> (SigHeaderName -> String)
-> ([SigHeaderName] -> ShowS)
-> Show SigHeaderName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SigHeaderName] -> ShowS
$cshowList :: [SigHeaderName] -> ShowS
show :: SigHeaderName -> String
$cshow :: SigHeaderName -> String
showsPrec :: Int -> SigHeaderName -> ShowS
$cshowsPrec :: Int -> SigHeaderName -> ShowS
Show,
String -> SigHeaderName
(String -> SigHeaderName) -> IsString SigHeaderName
forall a. (String -> a) -> IsString a
fromString :: String -> SigHeaderName
$cfromString :: String -> SigHeaderName
IsString
)
instance From SigHeaderName Text
instance From Text SigHeaderName
instance From SigHeaderName ByteString where
from :: SigHeaderName -> ByteString
from =
forall through source target.
(From source through, From through target,
'False ~ (source == through), 'False ~ (through == target)) =>
source -> target
via @Text
instance TryFrom ByteString SigHeaderName where
tryFrom :: ByteString
-> Either (TryFromException ByteString SigHeaderName) SigHeaderName
tryFrom =
forall source target.
(From source target, 'False ~ (source == target)) =>
source -> target
from @Text
(Text -> SigHeaderName)
-> (ByteString -> Either (TryFromException ByteString Text) Text)
-> ByteString
-> Either (TryFromException ByteString SigHeaderName) SigHeaderName
forall through source target.
('False ~ (source == through), 'False ~ (through == target)) =>
(through -> target)
-> (source -> Either (TryFromException source through) through)
-> source
-> Either (TryFromException source target) target
`composeTryRhs` ByteString -> Either (TryFromException ByteString Text) Text
forall source target.
(TryFrom source target, 'False ~ (source == target)) =>
source -> Either (TryFromException source target) target
tryFrom
newtype TlsCert (rel :: GRel)
= TlsCert Text
deriving newtype
( TlsCert rel -> TlsCert rel -> Bool
(TlsCert rel -> TlsCert rel -> Bool)
-> (TlsCert rel -> TlsCert rel -> Bool) -> Eq (TlsCert rel)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall (rel :: GRel). TlsCert rel -> TlsCert rel -> Bool
/= :: TlsCert rel -> TlsCert rel -> Bool
$c/= :: forall (rel :: GRel). TlsCert rel -> TlsCert rel -> Bool
== :: TlsCert rel -> TlsCert rel -> Bool
$c== :: forall (rel :: GRel). TlsCert rel -> TlsCert rel -> Bool
Eq,
Eq (TlsCert rel)
Eq (TlsCert rel)
-> (TlsCert rel -> TlsCert rel -> Ordering)
-> (TlsCert rel -> TlsCert rel -> Bool)
-> (TlsCert rel -> TlsCert rel -> Bool)
-> (TlsCert rel -> TlsCert rel -> Bool)
-> (TlsCert rel -> TlsCert rel -> Bool)
-> (TlsCert rel -> TlsCert rel -> TlsCert rel)
-> (TlsCert rel -> TlsCert rel -> TlsCert rel)
-> Ord (TlsCert rel)
TlsCert rel -> TlsCert rel -> Bool
TlsCert rel -> TlsCert rel -> Ordering
TlsCert rel -> TlsCert rel -> TlsCert rel
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall (rel :: GRel). Eq (TlsCert rel)
forall (rel :: GRel). TlsCert rel -> TlsCert rel -> Bool
forall (rel :: GRel). TlsCert rel -> TlsCert rel -> Ordering
forall (rel :: GRel). TlsCert rel -> TlsCert rel -> TlsCert rel
min :: TlsCert rel -> TlsCert rel -> TlsCert rel
$cmin :: forall (rel :: GRel). TlsCert rel -> TlsCert rel -> TlsCert rel
max :: TlsCert rel -> TlsCert rel -> TlsCert rel
$cmax :: forall (rel :: GRel). TlsCert rel -> TlsCert rel -> TlsCert rel
>= :: TlsCert rel -> TlsCert rel -> Bool
$c>= :: forall (rel :: GRel). TlsCert rel -> TlsCert rel -> Bool
> :: TlsCert rel -> TlsCert rel -> Bool
$c> :: forall (rel :: GRel). TlsCert rel -> TlsCert rel -> Bool
<= :: TlsCert rel -> TlsCert rel -> Bool
$c<= :: forall (rel :: GRel). TlsCert rel -> TlsCert rel -> Bool
< :: TlsCert rel -> TlsCert rel -> Bool
$c< :: forall (rel :: GRel). TlsCert rel -> TlsCert rel -> Bool
compare :: TlsCert rel -> TlsCert rel -> Ordering
$ccompare :: forall (rel :: GRel). TlsCert rel -> TlsCert rel -> Ordering
Ord,
Int -> TlsCert rel -> ShowS
[TlsCert rel] -> ShowS
TlsCert rel -> String
(Int -> TlsCert rel -> ShowS)
-> (TlsCert rel -> String)
-> ([TlsCert rel] -> ShowS)
-> Show (TlsCert rel)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
forall (rel :: GRel). Int -> TlsCert rel -> ShowS
forall (rel :: GRel). [TlsCert rel] -> ShowS
forall (rel :: GRel). TlsCert rel -> String
showList :: [TlsCert rel] -> ShowS
$cshowList :: forall (rel :: GRel). [TlsCert rel] -> ShowS
show :: TlsCert rel -> String
$cshow :: forall (rel :: GRel). TlsCert rel -> String
showsPrec :: Int -> TlsCert rel -> ShowS
$cshowsPrec :: forall (rel :: GRel). Int -> TlsCert rel -> ShowS
Show,
Value -> Parser [TlsCert rel]
Value -> Parser (TlsCert rel)
(Value -> Parser (TlsCert rel))
-> (Value -> Parser [TlsCert rel]) -> FromJSON (TlsCert rel)
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
forall (rel :: GRel). Value -> Parser [TlsCert rel]
forall (rel :: GRel). Value -> Parser (TlsCert rel)
parseJSONList :: Value -> Parser [TlsCert rel]
$cparseJSONList :: forall (rel :: GRel). Value -> Parser [TlsCert rel]
parseJSON :: Value -> Parser (TlsCert rel)
$cparseJSON :: forall (rel :: GRel). Value -> Parser (TlsCert rel)
FromJSON
)
newtype TlsKey (rel :: GRel)
= TlsKey Text
deriving newtype
( TlsKey rel -> TlsKey rel -> Bool
(TlsKey rel -> TlsKey rel -> Bool)
-> (TlsKey rel -> TlsKey rel -> Bool) -> Eq (TlsKey rel)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall (rel :: GRel). TlsKey rel -> TlsKey rel -> Bool
/= :: TlsKey rel -> TlsKey rel -> Bool
$c/= :: forall (rel :: GRel). TlsKey rel -> TlsKey rel -> Bool
== :: TlsKey rel -> TlsKey rel -> Bool
$c== :: forall (rel :: GRel). TlsKey rel -> TlsKey rel -> Bool
Eq,
Eq (TlsKey rel)
Eq (TlsKey rel)
-> (TlsKey rel -> TlsKey rel -> Ordering)
-> (TlsKey rel -> TlsKey rel -> Bool)
-> (TlsKey rel -> TlsKey rel -> Bool)
-> (TlsKey rel -> TlsKey rel -> Bool)
-> (TlsKey rel -> TlsKey rel -> Bool)
-> (TlsKey rel -> TlsKey rel -> TlsKey rel)
-> (TlsKey rel -> TlsKey rel -> TlsKey rel)
-> Ord (TlsKey rel)
TlsKey rel -> TlsKey rel -> Bool
TlsKey rel -> TlsKey rel -> Ordering
TlsKey rel -> TlsKey rel -> TlsKey rel
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall (rel :: GRel). Eq (TlsKey rel)
forall (rel :: GRel). TlsKey rel -> TlsKey rel -> Bool
forall (rel :: GRel). TlsKey rel -> TlsKey rel -> Ordering
forall (rel :: GRel). TlsKey rel -> TlsKey rel -> TlsKey rel
min :: TlsKey rel -> TlsKey rel -> TlsKey rel
$cmin :: forall (rel :: GRel). TlsKey rel -> TlsKey rel -> TlsKey rel
max :: TlsKey rel -> TlsKey rel -> TlsKey rel
$cmax :: forall (rel :: GRel). TlsKey rel -> TlsKey rel -> TlsKey rel
>= :: TlsKey rel -> TlsKey rel -> Bool
$c>= :: forall (rel :: GRel). TlsKey rel -> TlsKey rel -> Bool
> :: TlsKey rel -> TlsKey rel -> Bool
$c> :: forall (rel :: GRel). TlsKey rel -> TlsKey rel -> Bool
<= :: TlsKey rel -> TlsKey rel -> Bool
$c<= :: forall (rel :: GRel). TlsKey rel -> TlsKey rel -> Bool
< :: TlsKey rel -> TlsKey rel -> Bool
$c< :: forall (rel :: GRel). TlsKey rel -> TlsKey rel -> Bool
compare :: TlsKey rel -> TlsKey rel -> Ordering
$ccompare :: forall (rel :: GRel). TlsKey rel -> TlsKey rel -> Ordering
Ord,
Value -> Parser [TlsKey rel]
Value -> Parser (TlsKey rel)
(Value -> Parser (TlsKey rel))
-> (Value -> Parser [TlsKey rel]) -> FromJSON (TlsKey rel)
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
forall (rel :: GRel). Value -> Parser [TlsKey rel]
forall (rel :: GRel). Value -> Parser (TlsKey rel)
parseJSONList :: Value -> Parser [TlsKey rel]
$cparseJSONList :: forall (rel :: GRel). Value -> Parser [TlsKey rel]
parseJSON :: Value -> Parser (TlsKey rel)
$cparseJSON :: forall (rel :: GRel). Value -> Parser (TlsKey rel)
FromJSON
)
data TlsData (rel :: GRel) = TlsData
{ forall (rel :: GRel). TlsData rel -> TlsCert rel
tlsCert :: TlsCert rel,
forall (rel :: GRel). TlsData rel -> TlsKey rel
tlsKey :: TlsKey rel
}
deriving stock
( TlsData rel -> TlsData rel -> Bool
(TlsData rel -> TlsData rel -> Bool)
-> (TlsData rel -> TlsData rel -> Bool) -> Eq (TlsData rel)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall (rel :: GRel). TlsData rel -> TlsData rel -> Bool
/= :: TlsData rel -> TlsData rel -> Bool
$c/= :: forall (rel :: GRel). TlsData rel -> TlsData rel -> Bool
== :: TlsData rel -> TlsData rel -> Bool
$c== :: forall (rel :: GRel). TlsData rel -> TlsData rel -> Bool
Eq,
Eq (TlsData rel)
Eq (TlsData rel)
-> (TlsData rel -> TlsData rel -> Ordering)
-> (TlsData rel -> TlsData rel -> Bool)
-> (TlsData rel -> TlsData rel -> Bool)
-> (TlsData rel -> TlsData rel -> Bool)
-> (TlsData rel -> TlsData rel -> Bool)
-> (TlsData rel -> TlsData rel -> TlsData rel)
-> (TlsData rel -> TlsData rel -> TlsData rel)
-> Ord (TlsData rel)
TlsData rel -> TlsData rel -> Bool
TlsData rel -> TlsData rel -> Ordering
TlsData rel -> TlsData rel -> TlsData rel
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall (rel :: GRel). Eq (TlsData rel)
forall (rel :: GRel). TlsData rel -> TlsData rel -> Bool
forall (rel :: GRel). TlsData rel -> TlsData rel -> Ordering
forall (rel :: GRel). TlsData rel -> TlsData rel -> TlsData rel
min :: TlsData rel -> TlsData rel -> TlsData rel
$cmin :: forall (rel :: GRel). TlsData rel -> TlsData rel -> TlsData rel
max :: TlsData rel -> TlsData rel -> TlsData rel
$cmax :: forall (rel :: GRel). TlsData rel -> TlsData rel -> TlsData rel
>= :: TlsData rel -> TlsData rel -> Bool
$c>= :: forall (rel :: GRel). TlsData rel -> TlsData rel -> Bool
> :: TlsData rel -> TlsData rel -> Bool
$c> :: forall (rel :: GRel). TlsData rel -> TlsData rel -> Bool
<= :: TlsData rel -> TlsData rel -> Bool
$c<= :: forall (rel :: GRel). TlsData rel -> TlsData rel -> Bool
< :: TlsData rel -> TlsData rel -> Bool
$c< :: forall (rel :: GRel). TlsData rel -> TlsData rel -> Bool
compare :: TlsData rel -> TlsData rel -> Ordering
$ccompare :: forall (rel :: GRel). TlsData rel -> TlsData rel -> Ordering
Ord
)
instance FromJSON (TlsData (rel :: GRel)) where
parseJSON :: Value -> Parser (TlsData rel)
parseJSON =
String
-> (Object -> Parser (TlsData rel))
-> Value
-> Parser (TlsData rel)
forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject
String
"TlsData"
((Object -> Parser (TlsData rel)) -> Value -> Parser (TlsData rel))
-> (Object -> Parser (TlsData rel))
-> Value
-> Parser (TlsData rel)
forall a b. (a -> b) -> a -> b
$ \Object
x ->
TlsCert rel -> TlsKey rel -> TlsData rel
forall (rel :: GRel). TlsCert rel -> TlsKey rel -> TlsData rel
TlsData
(TlsCert rel -> TlsKey rel -> TlsData rel)
-> Parser (TlsCert rel) -> Parser (TlsKey rel -> TlsData rel)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
x Object -> Text -> Parser (TlsCert rel)
forall a. FromJSON a => Object -> Text -> Parser a
.: Text
"cert"
Parser (TlsKey rel -> TlsData rel)
-> Parser (TlsKey rel) -> Parser (TlsData rel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
x Object -> Text -> Parser (TlsKey rel)
forall a. FromJSON a => Object -> Text -> Parser a
.: Text
"key"
instance FromJSON SigHeaderName where
parseJSON :: Value -> Parser SigHeaderName
parseJSON =
String
-> (Text -> Parser SigHeaderName) -> Value -> Parser SigHeaderName
forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"SigHeaderName" ((Text -> Parser SigHeaderName) -> Value -> Parser SigHeaderName)
-> (Text -> Parser SigHeaderName) -> Value -> Parser SigHeaderName
forall a b. (a -> b) -> a -> b
$
SigHeaderName -> Parser SigHeaderName
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SigHeaderName -> Parser SigHeaderName)
-> (Text -> SigHeaderName) -> Text -> Parser SigHeaderName
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> SigHeaderName
SigHeaderName
data Encryption
= Encrypted
| UnEncrypted
deriving stock
( Encryption -> Encryption -> Bool
(Encryption -> Encryption -> Bool)
-> (Encryption -> Encryption -> Bool) -> Eq Encryption
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Encryption -> Encryption -> Bool
$c/= :: Encryption -> Encryption -> Bool
== :: Encryption -> Encryption -> Bool
$c== :: Encryption -> Encryption -> Bool
Eq,
Eq Encryption
Eq Encryption
-> (Encryption -> Encryption -> Ordering)
-> (Encryption -> Encryption -> Bool)
-> (Encryption -> Encryption -> Bool)
-> (Encryption -> Encryption -> Bool)
-> (Encryption -> Encryption -> Bool)
-> (Encryption -> Encryption -> Encryption)
-> (Encryption -> Encryption -> Encryption)
-> Ord Encryption
Encryption -> Encryption -> Bool
Encryption -> Encryption -> Ordering
Encryption -> Encryption -> Encryption
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 :: Encryption -> Encryption -> Encryption
$cmin :: Encryption -> Encryption -> Encryption
max :: Encryption -> Encryption -> Encryption
$cmax :: Encryption -> Encryption -> Encryption
>= :: Encryption -> Encryption -> Bool
$c>= :: Encryption -> Encryption -> Bool
> :: Encryption -> Encryption -> Bool
$c> :: Encryption -> Encryption -> Bool
<= :: Encryption -> Encryption -> Bool
$c<= :: Encryption -> Encryption -> Bool
< :: Encryption -> Encryption -> Bool
$c< :: Encryption -> Encryption -> Bool
compare :: Encryption -> Encryption -> Ordering
$ccompare :: Encryption -> Encryption -> Ordering
Ord,
Int -> Encryption -> ShowS
[Encryption] -> ShowS
Encryption -> String
(Int -> Encryption -> ShowS)
-> (Encryption -> String)
-> ([Encryption] -> ShowS)
-> Show Encryption
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Encryption] -> ShowS
$cshowList :: [Encryption] -> ShowS
show :: Encryption -> String
$cshow :: Encryption -> String
showsPrec :: Int -> Encryption -> ShowS
$cshowsPrec :: Int -> Encryption -> ShowS
Show,
ReadPrec [Encryption]
ReadPrec Encryption
Int -> ReadS Encryption
ReadS [Encryption]
(Int -> ReadS Encryption)
-> ReadS [Encryption]
-> ReadPrec Encryption
-> ReadPrec [Encryption]
-> Read Encryption
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Encryption]
$creadListPrec :: ReadPrec [Encryption]
readPrec :: ReadPrec Encryption
$creadPrec :: ReadPrec Encryption
readList :: ReadS [Encryption]
$creadList :: ReadS [Encryption]
readsPrec :: Int -> ReadS Encryption
$creadsPrec :: Int -> ReadS Encryption
Read,
Int -> Encryption
Encryption -> Int
Encryption -> [Encryption]
Encryption -> Encryption
Encryption -> Encryption -> [Encryption]
Encryption -> Encryption -> Encryption -> [Encryption]
(Encryption -> Encryption)
-> (Encryption -> Encryption)
-> (Int -> Encryption)
-> (Encryption -> Int)
-> (Encryption -> [Encryption])
-> (Encryption -> Encryption -> [Encryption])
-> (Encryption -> Encryption -> [Encryption])
-> (Encryption -> Encryption -> Encryption -> [Encryption])
-> Enum Encryption
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 :: Encryption -> Encryption -> Encryption -> [Encryption]
$cenumFromThenTo :: Encryption -> Encryption -> Encryption -> [Encryption]
enumFromTo :: Encryption -> Encryption -> [Encryption]
$cenumFromTo :: Encryption -> Encryption -> [Encryption]
enumFromThen :: Encryption -> Encryption -> [Encryption]
$cenumFromThen :: Encryption -> Encryption -> [Encryption]
enumFrom :: Encryption -> [Encryption]
$cenumFrom :: Encryption -> [Encryption]
fromEnum :: Encryption -> Int
$cfromEnum :: Encryption -> Int
toEnum :: Int -> Encryption
$ctoEnum :: Int -> Encryption
pred :: Encryption -> Encryption
$cpred :: Encryption -> Encryption
succ :: Encryption -> Encryption
$csucc :: Encryption -> Encryption
Enum,
Encryption
Encryption -> Encryption -> Bounded Encryption
forall a. a -> a -> Bounded a
maxBound :: Encryption
$cmaxBound :: Encryption
minBound :: Encryption
$cminBound :: Encryption
Bounded,
(forall x. Encryption -> Rep Encryption x)
-> (forall x. Rep Encryption x -> Encryption) -> Generic Encryption
forall x. Rep Encryption x -> Encryption
forall x. Encryption -> Rep Encryption x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Encryption x -> Encryption
$cfrom :: forall x. Encryption -> Rep Encryption x
Generic
)
instance Out Encryption
instance FromJSON Encryption