#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.JavaScriptCore.Enums
(
CheckSyntaxMode(..) ,
CheckSyntaxResult(..) ,
OptionType(..) ,
) 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 OptionType =
OptionTypeBoolean
| OptionTypeInt
| OptionTypeUint
| OptionTypeSize
| OptionTypeDouble
| OptionTypeString
| OptionTypeRangeString
| AnotherOptionType Int
deriving (Int -> OptionType -> ShowS
[OptionType] -> ShowS
OptionType -> String
(Int -> OptionType -> ShowS)
-> (OptionType -> String)
-> ([OptionType] -> ShowS)
-> Show OptionType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OptionType] -> ShowS
$cshowList :: [OptionType] -> ShowS
show :: OptionType -> String
$cshow :: OptionType -> String
showsPrec :: Int -> OptionType -> ShowS
$cshowsPrec :: Int -> OptionType -> ShowS
Show, OptionType -> OptionType -> Bool
(OptionType -> OptionType -> Bool)
-> (OptionType -> OptionType -> Bool) -> Eq OptionType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OptionType -> OptionType -> Bool
$c/= :: OptionType -> OptionType -> Bool
== :: OptionType -> OptionType -> Bool
$c== :: OptionType -> OptionType -> Bool
Eq)
instance P.Enum OptionType where
fromEnum :: OptionType -> Int
fromEnum OptionTypeBoolean = 0
fromEnum OptionTypeInt = 1
fromEnum OptionTypeUint = 2
fromEnum OptionTypeSize = 3
fromEnum OptionTypeDouble = 4
fromEnum OptionTypeString = 5
fromEnum OptionTypeRangeString = 6
fromEnum (AnotherOptionType k :: Int
k) = Int
k
toEnum :: Int -> OptionType
toEnum 0 = OptionType
OptionTypeBoolean
toEnum 1 = OptionType
OptionTypeInt
toEnum 2 = OptionType
OptionTypeUint
toEnum 3 = OptionType
OptionTypeSize
toEnum 4 = OptionType
OptionTypeDouble
toEnum 5 = OptionType
OptionTypeString
toEnum 6 = OptionType
OptionTypeRangeString
toEnum k :: Int
k = Int -> OptionType
AnotherOptionType Int
k
instance P.Ord OptionType where
compare :: OptionType -> OptionType -> Ordering
compare a :: OptionType
a b :: OptionType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (OptionType -> Int
forall a. Enum a => a -> Int
P.fromEnum OptionType
a) (OptionType -> Int
forall a. Enum a => a -> Int
P.fromEnum OptionType
b)
data CheckSyntaxResult =
CheckSyntaxResultSuccess
| CheckSyntaxResultRecoverableError
| CheckSyntaxResultIrrecoverableError
| CheckSyntaxResultUnterminatedLiteralError
| CheckSyntaxResultOutOfMemoryError
| CheckSyntaxResultStackOverflowError
| AnotherCheckSyntaxResult Int
deriving (Int -> CheckSyntaxResult -> ShowS
[CheckSyntaxResult] -> ShowS
CheckSyntaxResult -> String
(Int -> CheckSyntaxResult -> ShowS)
-> (CheckSyntaxResult -> String)
-> ([CheckSyntaxResult] -> ShowS)
-> Show CheckSyntaxResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CheckSyntaxResult] -> ShowS
$cshowList :: [CheckSyntaxResult] -> ShowS
show :: CheckSyntaxResult -> String
$cshow :: CheckSyntaxResult -> String
showsPrec :: Int -> CheckSyntaxResult -> ShowS
$cshowsPrec :: Int -> CheckSyntaxResult -> ShowS
Show, CheckSyntaxResult -> CheckSyntaxResult -> Bool
(CheckSyntaxResult -> CheckSyntaxResult -> Bool)
-> (CheckSyntaxResult -> CheckSyntaxResult -> Bool)
-> Eq CheckSyntaxResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CheckSyntaxResult -> CheckSyntaxResult -> Bool
$c/= :: CheckSyntaxResult -> CheckSyntaxResult -> Bool
== :: CheckSyntaxResult -> CheckSyntaxResult -> Bool
$c== :: CheckSyntaxResult -> CheckSyntaxResult -> Bool
Eq)
instance P.Enum CheckSyntaxResult where
fromEnum :: CheckSyntaxResult -> Int
fromEnum CheckSyntaxResultSuccess = 0
fromEnum CheckSyntaxResultRecoverableError = 1
fromEnum CheckSyntaxResultIrrecoverableError = 2
fromEnum CheckSyntaxResultUnterminatedLiteralError = 3
fromEnum CheckSyntaxResultOutOfMemoryError = 4
fromEnum CheckSyntaxResultStackOverflowError = 5
fromEnum (AnotherCheckSyntaxResult k :: Int
k) = Int
k
toEnum :: Int -> CheckSyntaxResult
toEnum 0 = CheckSyntaxResult
CheckSyntaxResultSuccess
toEnum 1 = CheckSyntaxResult
CheckSyntaxResultRecoverableError
toEnum 2 = CheckSyntaxResult
CheckSyntaxResultIrrecoverableError
toEnum 3 = CheckSyntaxResult
CheckSyntaxResultUnterminatedLiteralError
toEnum 4 = CheckSyntaxResult
CheckSyntaxResultOutOfMemoryError
toEnum 5 = CheckSyntaxResult
CheckSyntaxResultStackOverflowError
toEnum k :: Int
k = Int -> CheckSyntaxResult
AnotherCheckSyntaxResult Int
k
instance P.Ord CheckSyntaxResult where
compare :: CheckSyntaxResult -> CheckSyntaxResult -> Ordering
compare a :: CheckSyntaxResult
a b :: CheckSyntaxResult
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (CheckSyntaxResult -> Int
forall a. Enum a => a -> Int
P.fromEnum CheckSyntaxResult
a) (CheckSyntaxResult -> Int
forall a. Enum a => a -> Int
P.fromEnum CheckSyntaxResult
b)
data CheckSyntaxMode =
CheckSyntaxModeScript
| CheckSyntaxModeModule
| AnotherCheckSyntaxMode Int
deriving (Int -> CheckSyntaxMode -> ShowS
[CheckSyntaxMode] -> ShowS
CheckSyntaxMode -> String
(Int -> CheckSyntaxMode -> ShowS)
-> (CheckSyntaxMode -> String)
-> ([CheckSyntaxMode] -> ShowS)
-> Show CheckSyntaxMode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CheckSyntaxMode] -> ShowS
$cshowList :: [CheckSyntaxMode] -> ShowS
show :: CheckSyntaxMode -> String
$cshow :: CheckSyntaxMode -> String
showsPrec :: Int -> CheckSyntaxMode -> ShowS
$cshowsPrec :: Int -> CheckSyntaxMode -> ShowS
Show, CheckSyntaxMode -> CheckSyntaxMode -> Bool
(CheckSyntaxMode -> CheckSyntaxMode -> Bool)
-> (CheckSyntaxMode -> CheckSyntaxMode -> Bool)
-> Eq CheckSyntaxMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CheckSyntaxMode -> CheckSyntaxMode -> Bool
$c/= :: CheckSyntaxMode -> CheckSyntaxMode -> Bool
== :: CheckSyntaxMode -> CheckSyntaxMode -> Bool
$c== :: CheckSyntaxMode -> CheckSyntaxMode -> Bool
Eq)
instance P.Enum CheckSyntaxMode where
fromEnum :: CheckSyntaxMode -> Int
fromEnum CheckSyntaxModeScript = 0
fromEnum CheckSyntaxModeModule = 1
fromEnum (AnotherCheckSyntaxMode k :: Int
k) = Int
k
toEnum :: Int -> CheckSyntaxMode
toEnum 0 = CheckSyntaxMode
CheckSyntaxModeScript
toEnum 1 = CheckSyntaxMode
CheckSyntaxModeModule
toEnum k :: Int
k = Int -> CheckSyntaxMode
AnotherCheckSyntaxMode Int
k
instance P.Ord CheckSyntaxMode where
compare :: CheckSyntaxMode -> CheckSyntaxMode -> Ordering
compare a :: CheckSyntaxMode
a b :: CheckSyntaxMode
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (CheckSyntaxMode -> Int
forall a. Enum a => a -> Int
P.fromEnum CheckSyntaxMode
a) (CheckSyntaxMode -> Int
forall a. Enum a => a -> Int
P.fromEnum CheckSyntaxMode
b)