#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Secret.Enums
(
Error(..) ,
SchemaAttributeType(..) ,
SchemaType(..) ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
data SchemaType =
SchemaTypeNote
| SchemaTypeCompatNetwork
| AnotherSchemaType Int
deriving (Int -> SchemaType -> ShowS
[SchemaType] -> ShowS
SchemaType -> String
(Int -> SchemaType -> ShowS)
-> (SchemaType -> String)
-> ([SchemaType] -> ShowS)
-> Show SchemaType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SchemaType] -> ShowS
$cshowList :: [SchemaType] -> ShowS
show :: SchemaType -> String
$cshow :: SchemaType -> String
showsPrec :: Int -> SchemaType -> ShowS
$cshowsPrec :: Int -> SchemaType -> ShowS
Show, SchemaType -> SchemaType -> Bool
(SchemaType -> SchemaType -> Bool)
-> (SchemaType -> SchemaType -> Bool) -> Eq SchemaType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SchemaType -> SchemaType -> Bool
$c/= :: SchemaType -> SchemaType -> Bool
== :: SchemaType -> SchemaType -> Bool
$c== :: SchemaType -> SchemaType -> Bool
Eq)
instance P.Enum SchemaType where
fromEnum :: SchemaType -> Int
fromEnum SchemaTypeNote = 0
fromEnum SchemaTypeCompatNetwork = 1
fromEnum (AnotherSchemaType k :: Int
k) = Int
k
toEnum :: Int -> SchemaType
toEnum 0 = SchemaType
SchemaTypeNote
toEnum 1 = SchemaType
SchemaTypeCompatNetwork
toEnum k :: Int
k = Int -> SchemaType
AnotherSchemaType Int
k
instance P.Ord SchemaType where
compare :: SchemaType -> SchemaType -> Ordering
compare a :: SchemaType
a b :: SchemaType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (SchemaType -> Int
forall a. Enum a => a -> Int
P.fromEnum SchemaType
a) (SchemaType -> Int
forall a. Enum a => a -> Int
P.fromEnum SchemaType
b)
data SchemaAttributeType =
SchemaAttributeTypeString
| SchemaAttributeTypeInteger
| SchemaAttributeTypeBoolean
| AnotherSchemaAttributeType Int
deriving (Int -> SchemaAttributeType -> ShowS
[SchemaAttributeType] -> ShowS
SchemaAttributeType -> String
(Int -> SchemaAttributeType -> ShowS)
-> (SchemaAttributeType -> String)
-> ([SchemaAttributeType] -> ShowS)
-> Show SchemaAttributeType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SchemaAttributeType] -> ShowS
$cshowList :: [SchemaAttributeType] -> ShowS
show :: SchemaAttributeType -> String
$cshow :: SchemaAttributeType -> String
showsPrec :: Int -> SchemaAttributeType -> ShowS
$cshowsPrec :: Int -> SchemaAttributeType -> ShowS
Show, SchemaAttributeType -> SchemaAttributeType -> Bool
(SchemaAttributeType -> SchemaAttributeType -> Bool)
-> (SchemaAttributeType -> SchemaAttributeType -> Bool)
-> Eq SchemaAttributeType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SchemaAttributeType -> SchemaAttributeType -> Bool
$c/= :: SchemaAttributeType -> SchemaAttributeType -> Bool
== :: SchemaAttributeType -> SchemaAttributeType -> Bool
$c== :: SchemaAttributeType -> SchemaAttributeType -> Bool
Eq)
instance P.Enum SchemaAttributeType where
fromEnum :: SchemaAttributeType -> Int
fromEnum SchemaAttributeTypeString = 0
fromEnum SchemaAttributeTypeInteger = 1
fromEnum SchemaAttributeTypeBoolean = 2
fromEnum (AnotherSchemaAttributeType k :: Int
k) = Int
k
toEnum :: Int -> SchemaAttributeType
toEnum 0 = SchemaAttributeType
SchemaAttributeTypeString
toEnum 1 = SchemaAttributeType
SchemaAttributeTypeInteger
toEnum 2 = SchemaAttributeType
SchemaAttributeTypeBoolean
toEnum k :: Int
k = Int -> SchemaAttributeType
AnotherSchemaAttributeType Int
k
instance P.Ord SchemaAttributeType where
compare :: SchemaAttributeType -> SchemaAttributeType -> Ordering
compare a :: SchemaAttributeType
a b :: SchemaAttributeType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (SchemaAttributeType -> Int
forall a. Enum a => a -> Int
P.fromEnum SchemaAttributeType
a) (SchemaAttributeType -> Int
forall a. Enum a => a -> Int
P.fromEnum SchemaAttributeType
b)
data Error =
ErrorProtocol
| ErrorIsLocked
| ErrorNoSuchObject
| ErrorAlreadyExists
| AnotherError Int
deriving (Int -> Error -> ShowS
[Error] -> ShowS
Error -> String
(Int -> Error -> ShowS)
-> (Error -> String) -> ([Error] -> ShowS) -> Show Error
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Error] -> ShowS
$cshowList :: [Error] -> ShowS
show :: Error -> String
$cshow :: Error -> String
showsPrec :: Int -> Error -> ShowS
$cshowsPrec :: Int -> Error -> ShowS
Show, Error -> Error -> Bool
(Error -> Error -> Bool) -> (Error -> Error -> Bool) -> Eq Error
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Error -> Error -> Bool
$c/= :: Error -> Error -> Bool
== :: Error -> Error -> Bool
$c== :: Error -> Error -> Bool
Eq)
instance P.Enum Error where
fromEnum :: Error -> Int
fromEnum ErrorProtocol = 1
fromEnum ErrorIsLocked = 2
fromEnum ErrorNoSuchObject = 3
fromEnum ErrorAlreadyExists = 4
fromEnum (AnotherError k :: Int
k) = Int
k
toEnum :: Int -> Error
toEnum 1 = Error
ErrorProtocol
toEnum 2 = Error
ErrorIsLocked
toEnum 3 = Error
ErrorNoSuchObject
toEnum 4 = Error
ErrorAlreadyExists
toEnum k :: Int
k = Int -> Error
AnotherError Int
k
instance P.Ord Error where
compare :: Error -> Error -> Ordering
compare a :: Error
a b :: Error
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (Error -> Int
forall a. Enum a => a -> Int
P.fromEnum Error
a) (Error -> Int
forall a. Enum a => a -> Int
P.fromEnum Error
b)