#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GIRepository.Enums
(
ArrayType(..) ,
Direction(..) ,
InfoType(..) ,
NvokeError(..) ,
RepositoryError(..) ,
ScopeType(..) ,
Transfer(..) ,
TypeTag(..) ,
) 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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
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 Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
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
import qualified GHC.Records as R
data NvokeError =
NvokeErrorFailed
| NvokeErrorSymbolNotFound
| NvokeErrorArgumentMismatch
| AnotherNvokeError Int
deriving (Int -> NvokeError -> ShowS
[NvokeError] -> ShowS
NvokeError -> String
(Int -> NvokeError -> ShowS)
-> (NvokeError -> String)
-> ([NvokeError] -> ShowS)
-> Show NvokeError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NvokeError] -> ShowS
$cshowList :: [NvokeError] -> ShowS
show :: NvokeError -> String
$cshow :: NvokeError -> String
showsPrec :: Int -> NvokeError -> ShowS
$cshowsPrec :: Int -> NvokeError -> ShowS
Show, NvokeError -> NvokeError -> Bool
(NvokeError -> NvokeError -> Bool)
-> (NvokeError -> NvokeError -> Bool) -> Eq NvokeError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NvokeError -> NvokeError -> Bool
$c/= :: NvokeError -> NvokeError -> Bool
== :: NvokeError -> NvokeError -> Bool
$c== :: NvokeError -> NvokeError -> Bool
Eq)
instance P.Enum NvokeError where
fromEnum :: NvokeError -> Int
fromEnum NvokeError
NvokeErrorFailed = Int
0
fromEnum NvokeError
NvokeErrorSymbolNotFound = Int
1
fromEnum NvokeError
NvokeErrorArgumentMismatch = Int
2
fromEnum (AnotherNvokeError Int
k) = Int
k
toEnum :: Int -> NvokeError
toEnum Int
0 = NvokeError
NvokeErrorFailed
toEnum Int
1 = NvokeError
NvokeErrorSymbolNotFound
toEnum Int
2 = NvokeError
NvokeErrorArgumentMismatch
toEnum Int
k = Int -> NvokeError
AnotherNvokeError Int
k
instance P.Ord NvokeError where
compare :: NvokeError -> NvokeError -> Ordering
compare NvokeError
a NvokeError
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (NvokeError -> Int
forall a. Enum a => a -> Int
P.fromEnum NvokeError
a) (NvokeError -> Int
forall a. Enum a => a -> Int
P.fromEnum NvokeError
b)
data TypeTag =
TypeTagVoid
| TypeTagBoolean
| TypeTagInt8
| TypeTagUint8
| TypeTagInt16
| TypeTagUint16
| TypeTagInt32
| TypeTagUint32
| TypeTagInt64
| TypeTagUint64
| TypeTagFloat
| TypeTagDouble
| TypeTagGtype
| TypeTagUtf8
| TypeTagFilename
| TypeTagArray
| TypeTagInterface
| TypeTagGlist
| TypeTagGslist
| TypeTagGhash
| TypeTagError
| TypeTagUnichar
| AnotherTypeTag Int
deriving (Int -> TypeTag -> ShowS
[TypeTag] -> ShowS
TypeTag -> String
(Int -> TypeTag -> ShowS)
-> (TypeTag -> String) -> ([TypeTag] -> ShowS) -> Show TypeTag
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TypeTag] -> ShowS
$cshowList :: [TypeTag] -> ShowS
show :: TypeTag -> String
$cshow :: TypeTag -> String
showsPrec :: Int -> TypeTag -> ShowS
$cshowsPrec :: Int -> TypeTag -> ShowS
Show, TypeTag -> TypeTag -> Bool
(TypeTag -> TypeTag -> Bool)
-> (TypeTag -> TypeTag -> Bool) -> Eq TypeTag
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TypeTag -> TypeTag -> Bool
$c/= :: TypeTag -> TypeTag -> Bool
== :: TypeTag -> TypeTag -> Bool
$c== :: TypeTag -> TypeTag -> Bool
Eq)
instance P.Enum TypeTag where
fromEnum :: TypeTag -> Int
fromEnum TypeTag
TypeTagVoid = Int
0
fromEnum TypeTag
TypeTagBoolean = Int
1
fromEnum TypeTag
TypeTagInt8 = Int
2
fromEnum TypeTag
TypeTagUint8 = Int
3
fromEnum TypeTag
TypeTagInt16 = Int
4
fromEnum TypeTag
TypeTagUint16 = Int
5
fromEnum TypeTag
TypeTagInt32 = Int
6
fromEnum TypeTag
TypeTagUint32 = Int
7
fromEnum TypeTag
TypeTagInt64 = Int
8
fromEnum TypeTag
TypeTagUint64 = Int
9
fromEnum TypeTag
TypeTagFloat = Int
10
fromEnum TypeTag
TypeTagDouble = Int
11
fromEnum TypeTag
TypeTagGtype = Int
12
fromEnum TypeTag
TypeTagUtf8 = Int
13
fromEnum TypeTag
TypeTagFilename = Int
14
fromEnum TypeTag
TypeTagArray = Int
15
fromEnum TypeTag
TypeTagInterface = Int
16
fromEnum TypeTag
TypeTagGlist = Int
17
fromEnum TypeTag
TypeTagGslist = Int
18
fromEnum TypeTag
TypeTagGhash = Int
19
fromEnum TypeTag
TypeTagError = Int
20
fromEnum TypeTag
TypeTagUnichar = Int
21
fromEnum (AnotherTypeTag Int
k) = Int
k
toEnum :: Int -> TypeTag
toEnum Int
0 = TypeTag
TypeTagVoid
toEnum Int
1 = TypeTag
TypeTagBoolean
toEnum Int
2 = TypeTag
TypeTagInt8
toEnum Int
3 = TypeTag
TypeTagUint8
toEnum Int
4 = TypeTag
TypeTagInt16
toEnum Int
5 = TypeTag
TypeTagUint16
toEnum Int
6 = TypeTag
TypeTagInt32
toEnum Int
7 = TypeTag
TypeTagUint32
toEnum Int
8 = TypeTag
TypeTagInt64
toEnum Int
9 = TypeTag
TypeTagUint64
toEnum Int
10 = TypeTag
TypeTagFloat
toEnum Int
11 = TypeTag
TypeTagDouble
toEnum Int
12 = TypeTag
TypeTagGtype
toEnum Int
13 = TypeTag
TypeTagUtf8
toEnum Int
14 = TypeTag
TypeTagFilename
toEnum Int
15 = TypeTag
TypeTagArray
toEnum Int
16 = TypeTag
TypeTagInterface
toEnum Int
17 = TypeTag
TypeTagGlist
toEnum Int
18 = TypeTag
TypeTagGslist
toEnum Int
19 = TypeTag
TypeTagGhash
toEnum Int
20 = TypeTag
TypeTagError
toEnum Int
21 = TypeTag
TypeTagUnichar
toEnum Int
k = Int -> TypeTag
AnotherTypeTag Int
k
instance P.Ord TypeTag where
compare :: TypeTag -> TypeTag -> Ordering
compare TypeTag
a TypeTag
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (TypeTag -> Int
forall a. Enum a => a -> Int
P.fromEnum TypeTag
a) (TypeTag -> Int
forall a. Enum a => a -> Int
P.fromEnum TypeTag
b)
data Transfer =
TransferNothing
| TransferContainer
| TransferEverything
| AnotherTransfer Int
deriving (Int -> Transfer -> ShowS
[Transfer] -> ShowS
Transfer -> String
(Int -> Transfer -> ShowS)
-> (Transfer -> String) -> ([Transfer] -> ShowS) -> Show Transfer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Transfer] -> ShowS
$cshowList :: [Transfer] -> ShowS
show :: Transfer -> String
$cshow :: Transfer -> String
showsPrec :: Int -> Transfer -> ShowS
$cshowsPrec :: Int -> Transfer -> ShowS
Show, Transfer -> Transfer -> Bool
(Transfer -> Transfer -> Bool)
-> (Transfer -> Transfer -> Bool) -> Eq Transfer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Transfer -> Transfer -> Bool
$c/= :: Transfer -> Transfer -> Bool
== :: Transfer -> Transfer -> Bool
$c== :: Transfer -> Transfer -> Bool
Eq)
instance P.Enum Transfer where
fromEnum :: Transfer -> Int
fromEnum Transfer
TransferNothing = Int
0
fromEnum Transfer
TransferContainer = Int
1
fromEnum Transfer
TransferEverything = Int
2
fromEnum (AnotherTransfer Int
k) = Int
k
toEnum :: Int -> Transfer
toEnum Int
0 = Transfer
TransferNothing
toEnum Int
1 = Transfer
TransferContainer
toEnum Int
2 = Transfer
TransferEverything
toEnum Int
k = Int -> Transfer
AnotherTransfer Int
k
instance P.Ord Transfer where
compare :: Transfer -> Transfer -> Ordering
compare Transfer
a Transfer
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (Transfer -> Int
forall a. Enum a => a -> Int
P.fromEnum Transfer
a) (Transfer -> Int
forall a. Enum a => a -> Int
P.fromEnum Transfer
b)
data ScopeType =
ScopeTypeInvalid
| ScopeTypeCall
| ScopeTypeAsync
| ScopeTypeNotified
| AnotherScopeType Int
deriving (Int -> ScopeType -> ShowS
[ScopeType] -> ShowS
ScopeType -> String
(Int -> ScopeType -> ShowS)
-> (ScopeType -> String)
-> ([ScopeType] -> ShowS)
-> Show ScopeType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScopeType] -> ShowS
$cshowList :: [ScopeType] -> ShowS
show :: ScopeType -> String
$cshow :: ScopeType -> String
showsPrec :: Int -> ScopeType -> ShowS
$cshowsPrec :: Int -> ScopeType -> ShowS
Show, ScopeType -> ScopeType -> Bool
(ScopeType -> ScopeType -> Bool)
-> (ScopeType -> ScopeType -> Bool) -> Eq ScopeType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScopeType -> ScopeType -> Bool
$c/= :: ScopeType -> ScopeType -> Bool
== :: ScopeType -> ScopeType -> Bool
$c== :: ScopeType -> ScopeType -> Bool
Eq)
instance P.Enum ScopeType where
fromEnum :: ScopeType -> Int
fromEnum ScopeType
ScopeTypeInvalid = Int
0
fromEnum ScopeType
ScopeTypeCall = Int
1
fromEnum ScopeType
ScopeTypeAsync = Int
2
fromEnum ScopeType
ScopeTypeNotified = Int
3
fromEnum (AnotherScopeType Int
k) = Int
k
toEnum :: Int -> ScopeType
toEnum Int
0 = ScopeType
ScopeTypeInvalid
toEnum Int
1 = ScopeType
ScopeTypeCall
toEnum Int
2 = ScopeType
ScopeTypeAsync
toEnum Int
3 = ScopeType
ScopeTypeNotified
toEnum Int
k = Int -> ScopeType
AnotherScopeType Int
k
instance P.Ord ScopeType where
compare :: ScopeType -> ScopeType -> Ordering
compare ScopeType
a ScopeType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (ScopeType -> Int
forall a. Enum a => a -> Int
P.fromEnum ScopeType
a) (ScopeType -> Int
forall a. Enum a => a -> Int
P.fromEnum ScopeType
b)
data RepositoryError =
RepositoryErrorTypelibNotFound
| RepositoryErrorNamespaceMismatch
| RepositoryErrorNamespaceVersionConflict
| RepositoryErrorLibraryNotFound
| AnotherRepositoryError Int
deriving (Int -> RepositoryError -> ShowS
[RepositoryError] -> ShowS
RepositoryError -> String
(Int -> RepositoryError -> ShowS)
-> (RepositoryError -> String)
-> ([RepositoryError] -> ShowS)
-> Show RepositoryError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RepositoryError] -> ShowS
$cshowList :: [RepositoryError] -> ShowS
show :: RepositoryError -> String
$cshow :: RepositoryError -> String
showsPrec :: Int -> RepositoryError -> ShowS
$cshowsPrec :: Int -> RepositoryError -> ShowS
Show, RepositoryError -> RepositoryError -> Bool
(RepositoryError -> RepositoryError -> Bool)
-> (RepositoryError -> RepositoryError -> Bool)
-> Eq RepositoryError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RepositoryError -> RepositoryError -> Bool
$c/= :: RepositoryError -> RepositoryError -> Bool
== :: RepositoryError -> RepositoryError -> Bool
$c== :: RepositoryError -> RepositoryError -> Bool
Eq)
instance P.Enum RepositoryError where
fromEnum :: RepositoryError -> Int
fromEnum RepositoryError
RepositoryErrorTypelibNotFound = Int
0
fromEnum RepositoryError
RepositoryErrorNamespaceMismatch = Int
1
fromEnum RepositoryError
RepositoryErrorNamespaceVersionConflict = Int
2
fromEnum RepositoryError
RepositoryErrorLibraryNotFound = Int
3
fromEnum (AnotherRepositoryError Int
k) = Int
k
toEnum :: Int -> RepositoryError
toEnum Int
0 = RepositoryError
RepositoryErrorTypelibNotFound
toEnum Int
1 = RepositoryError
RepositoryErrorNamespaceMismatch
toEnum Int
2 = RepositoryError
RepositoryErrorNamespaceVersionConflict
toEnum Int
3 = RepositoryError
RepositoryErrorLibraryNotFound
toEnum Int
k = Int -> RepositoryError
AnotherRepositoryError Int
k
instance P.Ord RepositoryError where
compare :: RepositoryError -> RepositoryError -> Ordering
compare RepositoryError
a RepositoryError
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (RepositoryError -> Int
forall a. Enum a => a -> Int
P.fromEnum RepositoryError
a) (RepositoryError -> Int
forall a. Enum a => a -> Int
P.fromEnum RepositoryError
b)
data InfoType =
InfoTypeInvalid
| InfoTypeFunction
| InfoTypeCallback
| InfoTypeStruct
| InfoTypeBoxed
| InfoTypeEnum
| InfoTypeFlags
| InfoTypeObject
| InfoTypeInterface
| InfoTypeConstant
| InfoTypeInvalid0
| InfoTypeUnion
| InfoTypeValue
| InfoTypeSignal
| InfoTypeVfunc
| InfoTypeProperty
| InfoTypeField
| InfoTypeArg
| InfoTypeType
| InfoTypeUnresolved
| AnotherInfoType Int
deriving (Int -> InfoType -> ShowS
[InfoType] -> ShowS
InfoType -> String
(Int -> InfoType -> ShowS)
-> (InfoType -> String) -> ([InfoType] -> ShowS) -> Show InfoType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InfoType] -> ShowS
$cshowList :: [InfoType] -> ShowS
show :: InfoType -> String
$cshow :: InfoType -> String
showsPrec :: Int -> InfoType -> ShowS
$cshowsPrec :: Int -> InfoType -> ShowS
Show, InfoType -> InfoType -> Bool
(InfoType -> InfoType -> Bool)
-> (InfoType -> InfoType -> Bool) -> Eq InfoType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InfoType -> InfoType -> Bool
$c/= :: InfoType -> InfoType -> Bool
== :: InfoType -> InfoType -> Bool
$c== :: InfoType -> InfoType -> Bool
Eq)
instance P.Enum InfoType where
fromEnum :: InfoType -> Int
fromEnum InfoType
InfoTypeInvalid = Int
0
fromEnum InfoType
InfoTypeFunction = Int
1
fromEnum InfoType
InfoTypeCallback = Int
2
fromEnum InfoType
InfoTypeStruct = Int
3
fromEnum InfoType
InfoTypeBoxed = Int
4
fromEnum InfoType
InfoTypeEnum = Int
5
fromEnum InfoType
InfoTypeFlags = Int
6
fromEnum InfoType
InfoTypeObject = Int
7
fromEnum InfoType
InfoTypeInterface = Int
8
fromEnum InfoType
InfoTypeConstant = Int
9
fromEnum InfoType
InfoTypeInvalid0 = Int
10
fromEnum InfoType
InfoTypeUnion = Int
11
fromEnum InfoType
InfoTypeValue = Int
12
fromEnum InfoType
InfoTypeSignal = Int
13
fromEnum InfoType
InfoTypeVfunc = Int
14
fromEnum InfoType
InfoTypeProperty = Int
15
fromEnum InfoType
InfoTypeField = Int
16
fromEnum InfoType
InfoTypeArg = Int
17
fromEnum InfoType
InfoTypeType = Int
18
fromEnum InfoType
InfoTypeUnresolved = Int
19
fromEnum (AnotherInfoType Int
k) = Int
k
toEnum :: Int -> InfoType
toEnum Int
0 = InfoType
InfoTypeInvalid
toEnum Int
1 = InfoType
InfoTypeFunction
toEnum Int
2 = InfoType
InfoTypeCallback
toEnum Int
3 = InfoType
InfoTypeStruct
toEnum Int
4 = InfoType
InfoTypeBoxed
toEnum Int
5 = InfoType
InfoTypeEnum
toEnum Int
6 = InfoType
InfoTypeFlags
toEnum Int
7 = InfoType
InfoTypeObject
toEnum Int
8 = InfoType
InfoTypeInterface
toEnum Int
9 = InfoType
InfoTypeConstant
toEnum Int
10 = InfoType
InfoTypeInvalid0
toEnum Int
11 = InfoType
InfoTypeUnion
toEnum Int
12 = InfoType
InfoTypeValue
toEnum Int
13 = InfoType
InfoTypeSignal
toEnum Int
14 = InfoType
InfoTypeVfunc
toEnum Int
15 = InfoType
InfoTypeProperty
toEnum Int
16 = InfoType
InfoTypeField
toEnum Int
17 = InfoType
InfoTypeArg
toEnum Int
18 = InfoType
InfoTypeType
toEnum Int
19 = InfoType
InfoTypeUnresolved
toEnum Int
k = Int -> InfoType
AnotherInfoType Int
k
instance P.Ord InfoType where
compare :: InfoType -> InfoType -> Ordering
compare InfoType
a InfoType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (InfoType -> Int
forall a. Enum a => a -> Int
P.fromEnum InfoType
a) (InfoType -> Int
forall a. Enum a => a -> Int
P.fromEnum InfoType
b)
data Direction =
DirectionIn
| DirectionOut
| DirectionInout
| AnotherDirection Int
deriving (Int -> Direction -> ShowS
[Direction] -> ShowS
Direction -> String
(Int -> Direction -> ShowS)
-> (Direction -> String)
-> ([Direction] -> ShowS)
-> Show Direction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Direction] -> ShowS
$cshowList :: [Direction] -> ShowS
show :: Direction -> String
$cshow :: Direction -> String
showsPrec :: Int -> Direction -> ShowS
$cshowsPrec :: Int -> Direction -> ShowS
Show, Direction -> Direction -> Bool
(Direction -> Direction -> Bool)
-> (Direction -> Direction -> Bool) -> Eq Direction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Direction -> Direction -> Bool
$c/= :: Direction -> Direction -> Bool
== :: Direction -> Direction -> Bool
$c== :: Direction -> Direction -> Bool
Eq)
instance P.Enum Direction where
fromEnum :: Direction -> Int
fromEnum Direction
DirectionIn = Int
0
fromEnum Direction
DirectionOut = Int
1
fromEnum Direction
DirectionInout = Int
2
fromEnum (AnotherDirection Int
k) = Int
k
toEnum :: Int -> Direction
toEnum Int
0 = Direction
DirectionIn
toEnum Int
1 = Direction
DirectionOut
toEnum Int
2 = Direction
DirectionInout
toEnum Int
k = Int -> Direction
AnotherDirection Int
k
instance P.Ord Direction where
compare :: Direction -> Direction -> Ordering
compare Direction
a Direction
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (Direction -> Int
forall a. Enum a => a -> Int
P.fromEnum Direction
a) (Direction -> Int
forall a. Enum a => a -> Int
P.fromEnum Direction
b)
data ArrayType =
ArrayTypeC
| ArrayTypeArray
| ArrayTypePtrArray
| ArrayTypeByteArray
| AnotherArrayType Int
deriving (Int -> ArrayType -> ShowS
[ArrayType] -> ShowS
ArrayType -> String
(Int -> ArrayType -> ShowS)
-> (ArrayType -> String)
-> ([ArrayType] -> ShowS)
-> Show ArrayType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ArrayType] -> ShowS
$cshowList :: [ArrayType] -> ShowS
show :: ArrayType -> String
$cshow :: ArrayType -> String
showsPrec :: Int -> ArrayType -> ShowS
$cshowsPrec :: Int -> ArrayType -> ShowS
Show, ArrayType -> ArrayType -> Bool
(ArrayType -> ArrayType -> Bool)
-> (ArrayType -> ArrayType -> Bool) -> Eq ArrayType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ArrayType -> ArrayType -> Bool
$c/= :: ArrayType -> ArrayType -> Bool
== :: ArrayType -> ArrayType -> Bool
$c== :: ArrayType -> ArrayType -> Bool
Eq)
instance P.Enum ArrayType where
fromEnum :: ArrayType -> Int
fromEnum ArrayType
ArrayTypeC = Int
0
fromEnum ArrayType
ArrayTypeArray = Int
1
fromEnum ArrayType
ArrayTypePtrArray = Int
2
fromEnum ArrayType
ArrayTypeByteArray = Int
3
fromEnum (AnotherArrayType Int
k) = Int
k
toEnum :: Int -> ArrayType
toEnum Int
0 = ArrayType
ArrayTypeC
toEnum Int
1 = ArrayType
ArrayTypeArray
toEnum Int
2 = ArrayType
ArrayTypePtrArray
toEnum Int
3 = ArrayType
ArrayTypeByteArray
toEnum Int
k = Int -> ArrayType
AnotherArrayType Int
k
instance P.Ord ArrayType where
compare :: ArrayType -> ArrayType -> Ordering
compare ArrayType
a ArrayType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (ArrayType -> Int
forall a. Enum a => a -> Int
P.fromEnum ArrayType
a) (ArrayType -> Int
forall a. Enum a => a -> Int
P.fromEnum ArrayType
b)