#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Ggit.Enums
(
BranchType(..) ,
CloneLocal(..) ,
ConfigLevel(..) ,
DeltaType(..) ,
DiffBinaryType(..) ,
DiffFormatType(..) ,
DiffLineType(..) ,
Direction(..) ,
Error(..) ,
catchError ,
handleError ,
FileMode(..) ,
MergeFileFavor(..) ,
PackbuilderStage(..) ,
ProxyType(..) ,
RebaseOperationType(..) ,
RefType(..) ,
RemoteCompletionType(..) ,
RemoteDownloadTagsType(..) ,
ResetType(..) ,
StatusShow(..) ,
SubmoduleIgnore(..) ,
SubmoduleRecurse(..) ,
SubmoduleUpdate(..) ,
TreeWalkMode(..) ,
) 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.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 TreeWalkMode =
TreeWalkModePre
| TreeWalkModePost
| AnotherTreeWalkMode Int
deriving (Show, Eq)
instance P.Enum TreeWalkMode where
fromEnum TreeWalkModePre = 0
fromEnum TreeWalkModePost = 1
fromEnum (AnotherTreeWalkMode k) = k
toEnum 0 = TreeWalkModePre
toEnum 1 = TreeWalkModePost
toEnum k = AnotherTreeWalkMode k
instance P.Ord TreeWalkMode where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_tree_walk_mode_get_type" c_ggit_tree_walk_mode_get_type ::
IO GType
instance BoxedEnum TreeWalkMode where
boxedEnumType _ = c_ggit_tree_walk_mode_get_type
data SubmoduleUpdate =
SubmoduleUpdateCheckout
| SubmoduleUpdateRebase
| SubmoduleUpdateMerge
| SubmoduleUpdateNone
| SubmoduleUpdateDefault
| AnotherSubmoduleUpdate Int
deriving (Show, Eq)
instance P.Enum SubmoduleUpdate where
fromEnum SubmoduleUpdateCheckout = 1
fromEnum SubmoduleUpdateRebase = 2
fromEnum SubmoduleUpdateMerge = 3
fromEnum SubmoduleUpdateNone = 4
fromEnum SubmoduleUpdateDefault = 0
fromEnum (AnotherSubmoduleUpdate k) = k
toEnum 1 = SubmoduleUpdateCheckout
toEnum 2 = SubmoduleUpdateRebase
toEnum 3 = SubmoduleUpdateMerge
toEnum 4 = SubmoduleUpdateNone
toEnum 0 = SubmoduleUpdateDefault
toEnum k = AnotherSubmoduleUpdate k
instance P.Ord SubmoduleUpdate where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_submodule_update_get_type" c_ggit_submodule_update_get_type ::
IO GType
instance BoxedEnum SubmoduleUpdate where
boxedEnumType _ = c_ggit_submodule_update_get_type
data SubmoduleRecurse =
SubmoduleRecurseNo
| SubmoduleRecurseYes
| SubmoduleRecurseOndemand
| AnotherSubmoduleRecurse Int
deriving (Show, Eq)
instance P.Enum SubmoduleRecurse where
fromEnum SubmoduleRecurseNo = 0
fromEnum SubmoduleRecurseYes = 1
fromEnum SubmoduleRecurseOndemand = 2
fromEnum (AnotherSubmoduleRecurse k) = k
toEnum 0 = SubmoduleRecurseNo
toEnum 1 = SubmoduleRecurseYes
toEnum 2 = SubmoduleRecurseOndemand
toEnum k = AnotherSubmoduleRecurse k
instance P.Ord SubmoduleRecurse where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_submodule_recurse_get_type" c_ggit_submodule_recurse_get_type ::
IO GType
instance BoxedEnum SubmoduleRecurse where
boxedEnumType _ = c_ggit_submodule_recurse_get_type
data SubmoduleIgnore =
SubmoduleIgnoreUnspecified
| SubmoduleIgnoreNone
| SubmoduleIgnoreUntracked
| SubmoduleIgnoreDirty
| SubmoduleIgnoreAll
| AnotherSubmoduleIgnore Int
deriving (Show, Eq)
instance P.Enum SubmoduleIgnore where
fromEnum SubmoduleIgnoreUnspecified = -1
fromEnum SubmoduleIgnoreNone = 1
fromEnum SubmoduleIgnoreUntracked = 2
fromEnum SubmoduleIgnoreDirty = 3
fromEnum SubmoduleIgnoreAll = 4
fromEnum (AnotherSubmoduleIgnore k) = k
toEnum -1 = SubmoduleIgnoreUnspecified
toEnum 1 = SubmoduleIgnoreNone
toEnum 2 = SubmoduleIgnoreUntracked
toEnum 3 = SubmoduleIgnoreDirty
toEnum 4 = SubmoduleIgnoreAll
toEnum k = AnotherSubmoduleIgnore k
instance P.Ord SubmoduleIgnore where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_submodule_ignore_get_type" c_ggit_submodule_ignore_get_type ::
IO GType
instance BoxedEnum SubmoduleIgnore where
boxedEnumType _ = c_ggit_submodule_ignore_get_type
data StatusShow =
StatusShowIndexAndWorkdir
| StatusShowIndexOnly
| StatusShowWorkdirOnly
| AnotherStatusShow Int
deriving (Show, Eq)
instance P.Enum StatusShow where
fromEnum StatusShowIndexAndWorkdir = 0
fromEnum StatusShowIndexOnly = 1
fromEnum StatusShowWorkdirOnly = 2
fromEnum (AnotherStatusShow k) = k
toEnum 0 = StatusShowIndexAndWorkdir
toEnum 1 = StatusShowIndexOnly
toEnum 2 = StatusShowWorkdirOnly
toEnum k = AnotherStatusShow k
instance P.Ord StatusShow where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_status_show_get_type" c_ggit_status_show_get_type ::
IO GType
instance BoxedEnum StatusShow where
boxedEnumType _ = c_ggit_status_show_get_type
data ResetType =
ResetTypeSoft
| ResetTypeMixed
| ResetTypeHard
| AnotherResetType Int
deriving (Show, Eq)
instance P.Enum ResetType where
fromEnum ResetTypeSoft = 1
fromEnum ResetTypeMixed = 2
fromEnum ResetTypeHard = 3
fromEnum (AnotherResetType k) = k
toEnum 1 = ResetTypeSoft
toEnum 2 = ResetTypeMixed
toEnum 3 = ResetTypeHard
toEnum k = AnotherResetType k
instance P.Ord ResetType where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_reset_type_get_type" c_ggit_reset_type_get_type ::
IO GType
instance BoxedEnum ResetType where
boxedEnumType _ = c_ggit_reset_type_get_type
data RemoteDownloadTagsType =
RemoteDownloadTagsTypeUnspecified
| RemoteDownloadTagsTypeAuto
| RemoteDownloadTagsTypeNone
| RemoteDownloadTagsTypeAll
| AnotherRemoteDownloadTagsType Int
deriving (Show, Eq)
instance P.Enum RemoteDownloadTagsType where
fromEnum RemoteDownloadTagsTypeUnspecified = 0
fromEnum RemoteDownloadTagsTypeAuto = 1
fromEnum RemoteDownloadTagsTypeNone = 2
fromEnum RemoteDownloadTagsTypeAll = 3
fromEnum (AnotherRemoteDownloadTagsType k) = k
toEnum 0 = RemoteDownloadTagsTypeUnspecified
toEnum 1 = RemoteDownloadTagsTypeAuto
toEnum 2 = RemoteDownloadTagsTypeNone
toEnum 3 = RemoteDownloadTagsTypeAll
toEnum k = AnotherRemoteDownloadTagsType k
instance P.Ord RemoteDownloadTagsType where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_remote_download_tags_type_get_type" c_ggit_remote_download_tags_type_get_type ::
IO GType
instance BoxedEnum RemoteDownloadTagsType where
boxedEnumType _ = c_ggit_remote_download_tags_type_get_type
data RemoteCompletionType =
RemoteCompletionTypeDownload
| RemoteCompletionTypeIndexing
| RemoteCompletionTypeError
| AnotherRemoteCompletionType Int
deriving (Show, Eq)
instance P.Enum RemoteCompletionType where
fromEnum RemoteCompletionTypeDownload = 0
fromEnum RemoteCompletionTypeIndexing = 1
fromEnum RemoteCompletionTypeError = 2
fromEnum (AnotherRemoteCompletionType k) = k
toEnum 0 = RemoteCompletionTypeDownload
toEnum 1 = RemoteCompletionTypeIndexing
toEnum 2 = RemoteCompletionTypeError
toEnum k = AnotherRemoteCompletionType k
instance P.Ord RemoteCompletionType where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_remote_completion_type_get_type" c_ggit_remote_completion_type_get_type ::
IO GType
instance BoxedEnum RemoteCompletionType where
boxedEnumType _ = c_ggit_remote_completion_type_get_type
data RefType =
RefTypeInvalid
| RefTypeOid
| RefTypeSymbolic
| RefTypeListall
| AnotherRefType Int
deriving (Show, Eq)
instance P.Enum RefType where
fromEnum RefTypeInvalid = 0
fromEnum RefTypeOid = 1
fromEnum RefTypeSymbolic = 2
fromEnum RefTypeListall = 3
fromEnum (AnotherRefType k) = k
toEnum 0 = RefTypeInvalid
toEnum 1 = RefTypeOid
toEnum 2 = RefTypeSymbolic
toEnum 3 = RefTypeListall
toEnum k = AnotherRefType k
instance P.Ord RefType where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_ref_type_get_type" c_ggit_ref_type_get_type ::
IO GType
instance BoxedEnum RefType where
boxedEnumType _ = c_ggit_ref_type_get_type
data RebaseOperationType =
RebaseOperationTypePick
| RebaseOperationTypeReword
| RebaseOperationTypeEdit
| RebaseOperationTypeSquash
| RebaseOperationTypeFixup
| RebaseOperationTypeExec
| AnotherRebaseOperationType Int
deriving (Show, Eq)
instance P.Enum RebaseOperationType where
fromEnum RebaseOperationTypePick = 0
fromEnum RebaseOperationTypeReword = 1
fromEnum RebaseOperationTypeEdit = 2
fromEnum RebaseOperationTypeSquash = 3
fromEnum RebaseOperationTypeFixup = 4
fromEnum RebaseOperationTypeExec = 5
fromEnum (AnotherRebaseOperationType k) = k
toEnum 0 = RebaseOperationTypePick
toEnum 1 = RebaseOperationTypeReword
toEnum 2 = RebaseOperationTypeEdit
toEnum 3 = RebaseOperationTypeSquash
toEnum 4 = RebaseOperationTypeFixup
toEnum 5 = RebaseOperationTypeExec
toEnum k = AnotherRebaseOperationType k
instance P.Ord RebaseOperationType where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_rebase_operation_type_get_type" c_ggit_rebase_operation_type_get_type ::
IO GType
instance BoxedEnum RebaseOperationType where
boxedEnumType _ = c_ggit_rebase_operation_type_get_type
data ProxyType =
ProxyTypeNone
| ProxyTypeAuto
| ProxyTypeSpecified
| AnotherProxyType Int
deriving (Show, Eq)
instance P.Enum ProxyType where
fromEnum ProxyTypeNone = 0
fromEnum ProxyTypeAuto = 1
fromEnum ProxyTypeSpecified = 2
fromEnum (AnotherProxyType k) = k
toEnum 0 = ProxyTypeNone
toEnum 1 = ProxyTypeAuto
toEnum 2 = ProxyTypeSpecified
toEnum k = AnotherProxyType k
instance P.Ord ProxyType where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_proxy_type_get_type" c_ggit_proxy_type_get_type ::
IO GType
instance BoxedEnum ProxyType where
boxedEnumType _ = c_ggit_proxy_type_get_type
data PackbuilderStage =
PackbuilderStageAddingObjects
| PackbuilderStageDeltafication
| AnotherPackbuilderStage Int
deriving (Show, Eq)
instance P.Enum PackbuilderStage where
fromEnum PackbuilderStageAddingObjects = 0
fromEnum PackbuilderStageDeltafication = 1
fromEnum (AnotherPackbuilderStage k) = k
toEnum 0 = PackbuilderStageAddingObjects
toEnum 1 = PackbuilderStageDeltafication
toEnum k = AnotherPackbuilderStage k
instance P.Ord PackbuilderStage where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_packbuilder_stage_get_type" c_ggit_packbuilder_stage_get_type ::
IO GType
instance BoxedEnum PackbuilderStage where
boxedEnumType _ = c_ggit_packbuilder_stage_get_type
data MergeFileFavor =
MergeFileFavorNormal
| MergeFileFavorOurs
| MergeFileFavorTheirs
| MergeFileFavorUnion
| AnotherMergeFileFavor Int
deriving (Show, Eq)
instance P.Enum MergeFileFavor where
fromEnum MergeFileFavorNormal = 0
fromEnum MergeFileFavorOurs = 1
fromEnum MergeFileFavorTheirs = 2
fromEnum MergeFileFavorUnion = 3
fromEnum (AnotherMergeFileFavor k) = k
toEnum 0 = MergeFileFavorNormal
toEnum 1 = MergeFileFavorOurs
toEnum 2 = MergeFileFavorTheirs
toEnum 3 = MergeFileFavorUnion
toEnum k = AnotherMergeFileFavor k
instance P.Ord MergeFileFavor where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_merge_file_favor_get_type" c_ggit_merge_file_favor_get_type ::
IO GType
instance BoxedEnum MergeFileFavor where
boxedEnumType _ = c_ggit_merge_file_favor_get_type
data FileMode =
FileModeUnreadable
| FileModeTree
| FileModeBlob
| FileModeBlobExecutable
| FileModeLink
| FileModeCommit
| AnotherFileMode Int
deriving (Show, Eq)
instance P.Enum FileMode where
fromEnum FileModeUnreadable = 0
fromEnum FileModeTree = 16384
fromEnum FileModeBlob = 33188
fromEnum FileModeBlobExecutable = 33261
fromEnum FileModeLink = 40960
fromEnum FileModeCommit = 57344
fromEnum (AnotherFileMode k) = k
toEnum 0 = FileModeUnreadable
toEnum 16384 = FileModeTree
toEnum 33188 = FileModeBlob
toEnum 33261 = FileModeBlobExecutable
toEnum 40960 = FileModeLink
toEnum 57344 = FileModeCommit
toEnum k = AnotherFileMode k
instance P.Ord FileMode where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_file_mode_get_type" c_ggit_file_mode_get_type ::
IO GType
instance BoxedEnum FileMode where
boxedEnumType _ = c_ggit_file_mode_get_type
data Error =
ErrorGitError
| ErrorNotfound
| ErrorExists
| ErrorAmbiguous
| ErrorBufs
| ErrorPassthrough
| ErrorIterover
| AnotherError Int
deriving (Show, Eq)
instance P.Enum Error where
fromEnum ErrorGitError = -1
fromEnum ErrorNotfound = -3
fromEnum ErrorExists = -4
fromEnum ErrorAmbiguous = -5
fromEnum ErrorBufs = -6
fromEnum ErrorPassthrough = -30
fromEnum ErrorIterover = -31
fromEnum (AnotherError k) = k
toEnum -1 = ErrorGitError
toEnum -3 = ErrorNotfound
toEnum -4 = ErrorExists
toEnum -5 = ErrorAmbiguous
toEnum -6 = ErrorBufs
toEnum -30 = ErrorPassthrough
toEnum -31 = ErrorIterover
toEnum k = AnotherError k
instance P.Ord Error where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
instance GErrorClass Error where
gerrorClassDomain _ = "ggit-error"
catchError ::
IO a ->
(Error -> GErrorMessage -> IO a) ->
IO a
catchError = catchGErrorJustDomain
handleError ::
(Error -> GErrorMessage -> IO a) ->
IO a ->
IO a
handleError = handleGErrorJustDomain
foreign import ccall "ggit_error_get_type" c_ggit_error_get_type ::
IO GType
instance BoxedEnum Error where
boxedEnumType _ = c_ggit_error_get_type
data Direction =
DirectionFetch
| DirectionPush
| AnotherDirection Int
deriving (Show, Eq)
instance P.Enum Direction where
fromEnum DirectionFetch = 0
fromEnum DirectionPush = 1
fromEnum (AnotherDirection k) = k
toEnum 0 = DirectionFetch
toEnum 1 = DirectionPush
toEnum k = AnotherDirection k
instance P.Ord Direction where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_direction_get_type" c_ggit_direction_get_type ::
IO GType
instance BoxedEnum Direction where
boxedEnumType _ = c_ggit_direction_get_type
data DiffLineType =
DiffLineTypeContext
| DiffLineTypeAddition
| DiffLineTypeDeletion
| DiffLineTypeContextEofnl
| DiffLineTypeAddEofnl
| DiffLineTypeDelEofnl
| DiffLineTypeFileHdr
| DiffLineTypeHunkHdr
| DiffLineTypeBinary
| AnotherDiffLineType Int
deriving (Show, Eq)
instance P.Enum DiffLineType where
fromEnum DiffLineTypeContext = 32
fromEnum DiffLineTypeAddition = 43
fromEnum DiffLineTypeDeletion = 45
fromEnum DiffLineTypeContextEofnl = 61
fromEnum DiffLineTypeAddEofnl = 62
fromEnum DiffLineTypeDelEofnl = 60
fromEnum DiffLineTypeFileHdr = 70
fromEnum DiffLineTypeHunkHdr = 72
fromEnum DiffLineTypeBinary = 66
fromEnum (AnotherDiffLineType k) = k
toEnum 32 = DiffLineTypeContext
toEnum 43 = DiffLineTypeAddition
toEnum 45 = DiffLineTypeDeletion
toEnum 61 = DiffLineTypeContextEofnl
toEnum 62 = DiffLineTypeAddEofnl
toEnum 60 = DiffLineTypeDelEofnl
toEnum 70 = DiffLineTypeFileHdr
toEnum 72 = DiffLineTypeHunkHdr
toEnum 66 = DiffLineTypeBinary
toEnum k = AnotherDiffLineType k
instance P.Ord DiffLineType where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_diff_line_type_get_type" c_ggit_diff_line_type_get_type ::
IO GType
instance BoxedEnum DiffLineType where
boxedEnumType _ = c_ggit_diff_line_type_get_type
data DiffFormatType =
DiffFormatTypePatch
| DiffFormatTypePatchHeader
| DiffFormatTypeRaw
| DiffFormatTypeNameOnly
| DiffFormatTypeNameStatus
| AnotherDiffFormatType Int
deriving (Show, Eq)
instance P.Enum DiffFormatType where
fromEnum DiffFormatTypePatch = 1
fromEnum DiffFormatTypePatchHeader = 2
fromEnum DiffFormatTypeRaw = 3
fromEnum DiffFormatTypeNameOnly = 4
fromEnum DiffFormatTypeNameStatus = 5
fromEnum (AnotherDiffFormatType k) = k
toEnum 1 = DiffFormatTypePatch
toEnum 2 = DiffFormatTypePatchHeader
toEnum 3 = DiffFormatTypeRaw
toEnum 4 = DiffFormatTypeNameOnly
toEnum 5 = DiffFormatTypeNameStatus
toEnum k = AnotherDiffFormatType k
instance P.Ord DiffFormatType where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_diff_format_type_get_type" c_ggit_diff_format_type_get_type ::
IO GType
instance BoxedEnum DiffFormatType where
boxedEnumType _ = c_ggit_diff_format_type_get_type
data DiffBinaryType =
DiffBinaryTypeNone
| DiffBinaryTypeLiteral
| DiffBinaryTypeDelta
| AnotherDiffBinaryType Int
deriving (Show, Eq)
instance P.Enum DiffBinaryType where
fromEnum DiffBinaryTypeNone = 0
fromEnum DiffBinaryTypeLiteral = 1
fromEnum DiffBinaryTypeDelta = 2
fromEnum (AnotherDiffBinaryType k) = k
toEnum 0 = DiffBinaryTypeNone
toEnum 1 = DiffBinaryTypeLiteral
toEnum 2 = DiffBinaryTypeDelta
toEnum k = AnotherDiffBinaryType k
instance P.Ord DiffBinaryType where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_diff_binary_type_get_type" c_ggit_diff_binary_type_get_type ::
IO GType
instance BoxedEnum DiffBinaryType where
boxedEnumType _ = c_ggit_diff_binary_type_get_type
data DeltaType =
DeltaTypeUnmodified
| DeltaTypeAdded
| DeltaTypeDeleted
| DeltaTypeModified
| DeltaTypeRenamed
| DeltaTypeCopied
| DeltaTypeIgnored
| DeltaTypeUntracked
| AnotherDeltaType Int
deriving (Show, Eq)
instance P.Enum DeltaType where
fromEnum DeltaTypeUnmodified = 0
fromEnum DeltaTypeAdded = 1
fromEnum DeltaTypeDeleted = 2
fromEnum DeltaTypeModified = 3
fromEnum DeltaTypeRenamed = 4
fromEnum DeltaTypeCopied = 5
fromEnum DeltaTypeIgnored = 6
fromEnum DeltaTypeUntracked = 7
fromEnum (AnotherDeltaType k) = k
toEnum 0 = DeltaTypeUnmodified
toEnum 1 = DeltaTypeAdded
toEnum 2 = DeltaTypeDeleted
toEnum 3 = DeltaTypeModified
toEnum 4 = DeltaTypeRenamed
toEnum 5 = DeltaTypeCopied
toEnum 6 = DeltaTypeIgnored
toEnum 7 = DeltaTypeUntracked
toEnum k = AnotherDeltaType k
instance P.Ord DeltaType where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_delta_type_get_type" c_ggit_delta_type_get_type ::
IO GType
instance BoxedEnum DeltaType where
boxedEnumType _ = c_ggit_delta_type_get_type
data ConfigLevel =
ConfigLevelProgramdata
| ConfigLevelSystem
| ConfigLevelXdg
| ConfigLevelGlobal
| ConfigLevelLocal
| ConfigLevelApp
| ConfigLevelHighest
| AnotherConfigLevel Int
deriving (Show, Eq)
instance P.Enum ConfigLevel where
fromEnum ConfigLevelProgramdata = 1
fromEnum ConfigLevelSystem = 2
fromEnum ConfigLevelXdg = 3
fromEnum ConfigLevelGlobal = 4
fromEnum ConfigLevelLocal = 5
fromEnum ConfigLevelApp = 6
fromEnum ConfigLevelHighest = -1
fromEnum (AnotherConfigLevel k) = k
toEnum 1 = ConfigLevelProgramdata
toEnum 2 = ConfigLevelSystem
toEnum 3 = ConfigLevelXdg
toEnum 4 = ConfigLevelGlobal
toEnum 5 = ConfigLevelLocal
toEnum 6 = ConfigLevelApp
toEnum -1 = ConfigLevelHighest
toEnum k = AnotherConfigLevel k
instance P.Ord ConfigLevel where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_config_level_get_type" c_ggit_config_level_get_type ::
IO GType
instance BoxedEnum ConfigLevel where
boxedEnumType _ = c_ggit_config_level_get_type
data CloneLocal =
CloneLocalAuto
| CloneLocalLocal
| CloneLocalNoLocal
| CloneLocalNoLinks
| AnotherCloneLocal Int
deriving (Show, Eq)
instance P.Enum CloneLocal where
fromEnum CloneLocalAuto = 0
fromEnum CloneLocalLocal = 1
fromEnum CloneLocalNoLocal = 2
fromEnum CloneLocalNoLinks = 3
fromEnum (AnotherCloneLocal k) = k
toEnum 0 = CloneLocalAuto
toEnum 1 = CloneLocalLocal
toEnum 2 = CloneLocalNoLocal
toEnum 3 = CloneLocalNoLinks
toEnum k = AnotherCloneLocal k
instance P.Ord CloneLocal where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_clone_local_get_type" c_ggit_clone_local_get_type ::
IO GType
instance BoxedEnum CloneLocal where
boxedEnumType _ = c_ggit_clone_local_get_type
data BranchType =
BranchTypeLocal
| BranchTypeRemote
| AnotherBranchType Int
deriving (Show, Eq)
instance P.Enum BranchType where
fromEnum BranchTypeLocal = 1
fromEnum BranchTypeRemote = 2
fromEnum (AnotherBranchType k) = k
toEnum 1 = BranchTypeLocal
toEnum 2 = BranchTypeRemote
toEnum k = AnotherBranchType k
instance P.Ord BranchType where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "ggit_branch_type_get_type" c_ggit_branch_type_get_type ::
IO GType
instance BoxedEnum BranchType where
boxedEnumType _ = c_ggit_branch_type_get_type