gi-ggit-1.0.4: GI/Ggit/Enums.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)
-}
#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Ggit.Enums
(
-- * Enumerations
-- ** BranchType #enum:BranchType#
BranchType(..) ,
-- ** CloneLocal #enum:CloneLocal#
CloneLocal(..) ,
-- ** ConfigLevel #enum:ConfigLevel#
ConfigLevel(..) ,
-- ** DeltaType #enum:DeltaType#
DeltaType(..) ,
-- ** DiffBinaryType #enum:DiffBinaryType#
DiffBinaryType(..) ,
-- ** DiffFormatType #enum:DiffFormatType#
DiffFormatType(..) ,
-- ** DiffLineType #enum:DiffLineType#
DiffLineType(..) ,
-- ** Direction #enum:Direction#
Direction(..) ,
-- ** Error #enum:Error#
Error(..) ,
catchError ,
handleError ,
-- ** FileMode #enum:FileMode#
FileMode(..) ,
-- ** MergeFileFavor #enum:MergeFileFavor#
MergeFileFavor(..) ,
-- ** PackbuilderStage #enum:PackbuilderStage#
PackbuilderStage(..) ,
-- ** ProxyType #enum:ProxyType#
ProxyType(..) ,
-- ** RebaseOperationType #enum:RebaseOperationType#
RebaseOperationType(..) ,
-- ** RefType #enum:RefType#
RefType(..) ,
-- ** RemoteCompletionType #enum:RemoteCompletionType#
RemoteCompletionType(..) ,
-- ** RemoteDownloadTagsType #enum:RemoteDownloadTagsType#
RemoteDownloadTagsType(..) ,
-- ** ResetType #enum:ResetType#
ResetType(..) ,
-- ** StatusShow #enum:StatusShow#
StatusShow(..) ,
-- ** SubmoduleIgnore #enum:SubmoduleIgnore#
SubmoduleIgnore(..) ,
-- ** SubmoduleRecurse #enum:SubmoduleRecurse#
SubmoduleRecurse(..) ,
-- ** SubmoduleUpdate #enum:SubmoduleUpdate#
SubmoduleUpdate(..) ,
-- ** TreeWalkMode #enum:TreeWalkMode#
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
-- Enum TreeWalkMode
{- |
Describes in which order a tree walk should be performed.
-}
data TreeWalkMode =
TreeWalkModePre
{- ^
walk tree in pre-order
-}
| TreeWalkModePost
{- ^
walk tree in post-order
-}
| AnotherTreeWalkMode Int
-- ^ Catch-all for unknown values
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
-- Enum SubmoduleUpdate
{- |
Describes how a submodule should be updated.
-}
data SubmoduleUpdate =
SubmoduleUpdateCheckout
{- ^
checkout the submodule.
-}
| SubmoduleUpdateRebase
{- ^
rebase the current branch onto the
commit recorded in the superproject.
-}
| SubmoduleUpdateMerge
{- ^
merge the commit recorded in the
superproject into the current branch.
-}
| SubmoduleUpdateNone
{- ^
do not update this submodule.
-}
| SubmoduleUpdateDefault
{- ^
not used except as static initializer
when we don\'t want any particular update rule to be specified.
-}
| AnotherSubmoduleUpdate Int
-- ^ Catch-all for unknown values
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
-- Enum SubmoduleRecurse
{- |
Options for submodule recurse.
Represents the value of @submodule.$name.fetchRecurseSubmodules@
-}
data SubmoduleRecurse =
SubmoduleRecurseNo
{- ^
do no recurse into submodules.
-}
| SubmoduleRecurseYes
{- ^
recurse into submodules.
-}
| SubmoduleRecurseOndemand
{- ^
recurse into submodules only when
commit not already in local clone.
-}
| AnotherSubmoduleRecurse Int
-- ^ Catch-all for unknown values
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
-- Enum SubmoduleIgnore
{- |
Describes which submodules should be ignored.
-}
data SubmoduleIgnore =
SubmoduleIgnoreUnspecified
{- ^
reset to on-disk value.
-}
| SubmoduleIgnoreNone
{- ^
don\'t ignore any change.
-}
| SubmoduleIgnoreUntracked
{- ^
ignore untracked files.
-}
| SubmoduleIgnoreDirty
{- ^
ignore changes in the working directory.
-}
| SubmoduleIgnoreAll
{- ^
never check if the submodule is dirty.
-}
| AnotherSubmoduleIgnore Int
-- ^ Catch-all for unknown values
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
-- Enum StatusShow
{- |
Show options for @/ggit_repository_file_status_foreach/@. Determines which
files are included in the status.
-}
data StatusShow =
StatusShowIndexAndWorkdir
{- ^
receive one callback for each file,
even if the file is in both the index and the workdir (combining 'GI.Ggit.Flags.StatusFlags').
-}
| StatusShowIndexOnly
{- ^
only receive callbacks for files in the index.
-}
| StatusShowWorkdirOnly
{- ^
only receive callbacks for files in the workdir.
-}
| AnotherStatusShow Int
-- ^ Catch-all for unknown values
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
-- Enum ResetType
{- |
Describes the type of reset to perform.
-}
data ResetType =
ResetTypeSoft
{- ^
The head will be moved to the commit.
-}
| ResetTypeMixed
{- ^
the head will be moved to the commit and the index
will be replaced with the content of the commit tree.
-}
| ResetTypeHard
{- ^
MIXED plus changes in working tree discarded.
-}
| AnotherResetType Int
-- ^ Catch-all for unknown values
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
-- Enum RemoteDownloadTagsType
{- |
Automatic tag following option
Lets us select the --tags option to use.
-}
data RemoteDownloadTagsType =
RemoteDownloadTagsTypeUnspecified
{- ^
Use the setting from the configuration.
-}
| RemoteDownloadTagsTypeAuto
{- ^
Ask the server for tags pointing to objects we\'re already
downloading.
-}
| RemoteDownloadTagsTypeNone
{- ^
Don\'t ask for any tags beyond the refspecs.
-}
| RemoteDownloadTagsTypeAll
{- ^
Ask for the all the tags.
-}
| AnotherRemoteDownloadTagsType Int
-- ^ Catch-all for unknown values
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
-- Enum RemoteCompletionType
{- |
Argument to the completion callback which tells it which operation finished.
-}
data RemoteCompletionType =
RemoteCompletionTypeDownload
{- ^
download.
-}
| RemoteCompletionTypeIndexing
{- ^
indexing.
-}
| RemoteCompletionTypeError
{- ^
error.
-}
| AnotherRemoteCompletionType Int
-- ^ Catch-all for unknown values
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
-- Enum RefType
{- |
Describes the type a reference is.
-}
data RefType =
RefTypeInvalid
{- ^
An invalid reference.
-}
| RefTypeOid
{- ^
A reference which points at an object id.
-}
| RefTypeSymbolic
{- ^
A reference which points at another reference.
-}
| RefTypeListall
{- ^
All reference types.
-}
| AnotherRefType Int
-- ^ Catch-all for unknown values
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
-- Enum RebaseOperationType
{- |
Type of rebase operation in-progress.
-}
data RebaseOperationType =
RebaseOperationTypePick
{- ^
The given commit is to be cherry-picked.
The client should commit the changes and continue if there are no conflicts.
-}
| RebaseOperationTypeReword
{- ^
The given commit is to be cherry-picked,
but the client should prompt the user to provide an updated commit message.
-}
| RebaseOperationTypeEdit
{- ^
The given commit is to be cherry-picked,
but the client should stop to allow the user to edit the changes before
committing them.
-}
| RebaseOperationTypeSquash
{- ^
The given commit is to be squashed into
the previous commit. The commit message will be merged with the previous message.
-}
| RebaseOperationTypeFixup
{- ^
The given commit is to be squashed into the
previous commit. The commit message from this commit will be discarded.
-}
| RebaseOperationTypeExec
{- ^
No commit will be cherry-picked.
The client should run the given command and (if successful) continue.
-}
| AnotherRebaseOperationType Int
-- ^ Catch-all for unknown values
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
-- Enum ProxyType
{- |
The type of proxy to use.
-}
data ProxyType =
ProxyTypeNone
{- ^
Do not attempt to connect through a proxy.
-}
| ProxyTypeAuto
{- ^
Try to auto-detect the proxy from the git configuration.
-}
| ProxyTypeSpecified
{- ^
Connect via the URL given in the options.
-}
| AnotherProxyType Int
-- ^ Catch-all for unknown values
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
-- Enum PackbuilderStage
{- |
Valid stages for pack building.
-}
data PackbuilderStage =
PackbuilderStageAddingObjects
{- ^
adding objects.
-}
| PackbuilderStageDeltafication
{- ^
deltafication.
-}
| AnotherPackbuilderStage Int
-- ^ Catch-all for unknown values
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
-- Enum MergeFileFavor
{- |
/No description available in the introspection data./
-}
data MergeFileFavor =
MergeFileFavorNormal
{- ^
/No description available in the introspection data./
-}
| MergeFileFavorOurs
{- ^
/No description available in the introspection data./
-}
| MergeFileFavorTheirs
{- ^
/No description available in the introspection data./
-}
| MergeFileFavorUnion
{- ^
/No description available in the introspection data./
-}
| AnotherMergeFileFavor Int
-- ^ Catch-all for unknown values
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
-- Enum FileMode
{- |
/No description available in the introspection data./
-}
data FileMode =
FileModeUnreadable
{- ^
/No description available in the introspection data./
-}
| FileModeTree
{- ^
/No description available in the introspection data./
-}
| FileModeBlob
{- ^
/No description available in the introspection data./
-}
| FileModeBlobExecutable
{- ^
/No description available in the introspection data./
-}
| FileModeLink
{- ^
/No description available in the introspection data./
-}
| FileModeCommit
{- ^
/No description available in the introspection data./
-}
| AnotherFileMode Int
-- ^ Catch-all for unknown values
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
-- Enum Error
{- |
Error codes for the @/GGIT_ERROR/@ error domain.
-}
data Error =
ErrorGitError
{- ^
A generic error for when an operation fails.
-}
| ErrorNotfound
{- ^
Input does not exist in the scope searched.
-}
| ErrorExists
{- ^
A reference with this name already exists.
-}
| ErrorAmbiguous
{- ^
The given error is ambiguous.
-}
| ErrorBufs
{- ^
The buffer is too short.
-}
| ErrorPassthrough
{- ^
Skip and passthrough the given ODB backend.
-}
| ErrorIterover
{- ^
The iteration has finished.
-}
| AnotherError Int
-- ^ Catch-all for unknown values
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"
-- | Catch exceptions of type `Error`. This is a specialized version of `Data.GI.Base.GError.catchGErrorJustDomain`.
catchError ::
IO a ->
(Error -> GErrorMessage -> IO a) ->
IO a
catchError = catchGErrorJustDomain
-- | Handle exceptions of type `Error`. This is a specialized version of `Data.GI.Base.GError.handleGErrorJustDomain`.
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
-- Enum Direction
{- |
/No description available in the introspection data./
-}
data Direction =
DirectionFetch
{- ^
/No description available in the introspection data./
-}
| DirectionPush
{- ^
/No description available in the introspection data./
-}
| AnotherDirection Int
-- ^ Catch-all for unknown values
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
-- Enum DiffLineType
{- |
These values describe where a line came from and will be passed to
the 'GI.Ggit.Callbacks.DiffLineCallback' when iterating over a diff.
The @/GGIT_DIFF_LINE_FILE_HDR/@, @/GGIT_DIFF_LINE_HUNK_HDR/@ and
@/GGIT_DIFF_LINE_BINARY/@ values are only sent when the diff is being printed.
-}
data DiffLineType =
DiffLineTypeContext
{- ^
line is part of the context.
-}
| DiffLineTypeAddition
{- ^
line that was added.
-}
| DiffLineTypeDeletion
{- ^
line that was removed.
-}
| DiffLineTypeContextEofnl
{- ^
Both files have no LF at end.
-}
| DiffLineTypeAddEofnl
{- ^
LF was added at end of file.
-}
| DiffLineTypeDelEofnl
{- ^
LF was removed at end of file.
-}
| DiffLineTypeFileHdr
{- ^
the file header.
-}
| DiffLineTypeHunkHdr
{- ^
the hunk header.
-}
| DiffLineTypeBinary
{- ^
is binary.
-}
| AnotherDiffLineType Int
-- ^ Catch-all for unknown values
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
-- Enum DiffFormatType
{- |
Possible output formats for diff data.
-}
data DiffFormatType =
DiffFormatTypePatch
{- ^
full git diff.
-}
| DiffFormatTypePatchHeader
{- ^
just the file headers of patch.
-}
| DiffFormatTypeRaw
{- ^
like git diff --raw.
-}
| DiffFormatTypeNameOnly
{- ^
like git diff --name-only.
-}
| DiffFormatTypeNameStatus
{- ^
like git diff --name-status.
-}
| AnotherDiffFormatType Int
-- ^ Catch-all for unknown values
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
-- Enum DiffBinaryType
{- |
When producing a binary diff, the binary data returned will be
either the deflated full (\"literal\") contents of the file, or
the deflated binary delta between the two sides (whichever is
smaller).
-}
data DiffBinaryType =
DiffBinaryTypeNone
{- ^
/No description available in the introspection data./
-}
| DiffBinaryTypeLiteral
{- ^
/No description available in the introspection data./
-}
| DiffBinaryTypeDelta
{- ^
/No description available in the introspection data./
-}
| AnotherDiffBinaryType Int
-- ^ Catch-all for unknown values
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
-- Enum DeltaType
{- |
Describes the type of change the delta is.
-}
data DeltaType =
DeltaTypeUnmodified
{- ^
unmodified.
-}
| DeltaTypeAdded
{- ^
added.
-}
| DeltaTypeDeleted
{- ^
deleted.
-}
| DeltaTypeModified
{- ^
modified.
-}
| DeltaTypeRenamed
{- ^
renamed.
-}
| DeltaTypeCopied
{- ^
copied.
-}
| DeltaTypeIgnored
{- ^
ignored.
-}
| DeltaTypeUntracked
{- ^
untracked.
-}
| AnotherDeltaType Int
-- ^ Catch-all for unknown values
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
-- Enum ConfigLevel
{- |
Priority level of a config file.
These priority levels correspond to the natural escalation logic
(from higher to lower) when searching for config entries in git.git.
-}
data ConfigLevel =
ConfigLevelProgramdata
{- ^
System-wide on Windows, for compatibility with portable git.
-}
| ConfigLevelSystem
{- ^
System-wide configuration file.
-}
| ConfigLevelXdg
{- ^
XDG compatible configuration file (.config\/git\/config).
-}
| ConfigLevelGlobal
{- ^
User-specific configuration file, also called Global configuration file.
-}
| ConfigLevelLocal
{- ^
Repository specific configuration file.
-}
| ConfigLevelApp
{- ^
Application specific configuration file; freely defined by applications.
-}
| ConfigLevelHighest
{- ^
Represents the highest level of a config file.
-}
| AnotherConfigLevel Int
-- ^ Catch-all for unknown values
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
-- Enum CloneLocal
{- |
/No description available in the introspection data./
-}
data CloneLocal =
CloneLocalAuto
{- ^
/No description available in the introspection data./
-}
| CloneLocalLocal
{- ^
/No description available in the introspection data./
-}
| CloneLocalNoLocal
{- ^
/No description available in the introspection data./
-}
| CloneLocalNoLinks
{- ^
/No description available in the introspection data./
-}
| AnotherCloneLocal Int
-- ^ Catch-all for unknown values
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
-- Enum BranchType
{- |
The type of a branch.
-}
data BranchType =
BranchTypeLocal
{- ^
specifies a local branch.
-}
| BranchTypeRemote
{- ^
specifies a remote branch.
-}
| AnotherBranchType Int
-- ^ Catch-all for unknown values
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