{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- A structure allowing control over commits.

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.OSTree.Structs.RepoCommitModifier
    ( 

-- * Exported types
    RepoCommitModifier(..)                  ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [ref]("GI.OSTree.Structs.RepoCommitModifier#g:method:ref"), [unref]("GI.OSTree.Structs.RepoCommitModifier#g:method:unref").
-- 
-- ==== Getters
-- /None/.
-- 
-- ==== Setters
-- [setDevinoCache]("GI.OSTree.Structs.RepoCommitModifier#g:method:setDevinoCache"), [setSepolicy]("GI.OSTree.Structs.RepoCommitModifier#g:method:setSepolicy"), [setSepolicyFromCommit]("GI.OSTree.Structs.RepoCommitModifier#g:method:setSepolicyFromCommit"), [setXattrCallback]("GI.OSTree.Structs.RepoCommitModifier#g:method:setXattrCallback").

#if defined(ENABLE_OVERLOADING)
    ResolveRepoCommitModifierMethod         ,
#endif

-- ** new #method:new#

    repoCommitModifierNew                   ,


-- ** ref #method:ref#

#if defined(ENABLE_OVERLOADING)
    RepoCommitModifierRefMethodInfo         ,
#endif
    repoCommitModifierRef                   ,


-- ** setDevinoCache #method:setDevinoCache#

#if defined(ENABLE_OVERLOADING)
    RepoCommitModifierSetDevinoCacheMethodInfo,
#endif
    repoCommitModifierSetDevinoCache        ,


-- ** setSepolicy #method:setSepolicy#

#if defined(ENABLE_OVERLOADING)
    RepoCommitModifierSetSepolicyMethodInfo ,
#endif
    repoCommitModifierSetSepolicy           ,


-- ** setSepolicyFromCommit #method:setSepolicyFromCommit#

#if defined(ENABLE_OVERLOADING)
    RepoCommitModifierSetSepolicyFromCommitMethodInfo,
#endif
    repoCommitModifierSetSepolicyFromCommit ,


-- ** setXattrCallback #method:setXattrCallback#

#if defined(ENABLE_OVERLOADING)
    RepoCommitModifierSetXattrCallbackMethodInfo,
#endif
    repoCommitModifierSetXattrCallback      ,


-- ** unref #method:unref#

#if defined(ENABLE_OVERLOADING)
    RepoCommitModifierUnrefMethodInfo       ,
#endif
    repoCommitModifierUnref                 ,




    ) 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.GHashTable as B.GHT
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.Kind as DK
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
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT

-- Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/23392
#if MIN_VERSION_base(4,18,0)
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GLib.Structs.KeyFile as GLib.KeyFile
import qualified GI.GLib.Structs.String as GLib.String
import qualified GI.GLib.Structs.VariantDict as GLib.VariantDict
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Flags as Gio.Flags
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Interfaces.File as Gio.File
import qualified GI.Gio.Interfaces.Initable as Gio.Initable
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Gio.Objects.FileInfo as Gio.FileInfo
import qualified GI.Gio.Objects.InputStream as Gio.InputStream
import qualified GI.Gio.Objects.OutputStream as Gio.OutputStream
import qualified GI.OSTree.Callbacks as OSTree.Callbacks
import {-# SOURCE #-} qualified GI.OSTree.Enums as OSTree.Enums
import {-# SOURCE #-} qualified GI.OSTree.Flags as OSTree.Flags
import {-# SOURCE #-} qualified GI.OSTree.Interfaces.BlobReader as OSTree.BlobReader
import {-# SOURCE #-} qualified GI.OSTree.Interfaces.RepoFinder as OSTree.RepoFinder
import {-# SOURCE #-} qualified GI.OSTree.Interfaces.Sign as OSTree.Sign
import {-# SOURCE #-} qualified GI.OSTree.Objects.AsyncProgress as OSTree.AsyncProgress
import {-# SOURCE #-} qualified GI.OSTree.Objects.ContentWriter as OSTree.ContentWriter
import {-# SOURCE #-} qualified GI.OSTree.Objects.GpgVerifyResult as OSTree.GpgVerifyResult
import {-# SOURCE #-} qualified GI.OSTree.Objects.MutableTree as OSTree.MutableTree
import {-# SOURCE #-} qualified GI.OSTree.Objects.Repo as OSTree.Repo
import {-# SOURCE #-} qualified GI.OSTree.Objects.RepoFile as OSTree.RepoFile
import {-# SOURCE #-} qualified GI.OSTree.Objects.SePolicy as OSTree.SePolicy
import {-# SOURCE #-} qualified GI.OSTree.Structs.CollectionRef as OSTree.CollectionRef
import {-# SOURCE #-} qualified GI.OSTree.Structs.Remote as OSTree.Remote
import {-# SOURCE #-} qualified GI.OSTree.Structs.RepoCheckoutAtOptions as OSTree.RepoCheckoutAtOptions
import {-# SOURCE #-} qualified GI.OSTree.Structs.RepoDevInoCache as OSTree.RepoDevInoCache
import {-# SOURCE #-} qualified GI.OSTree.Structs.RepoFinderResult as OSTree.RepoFinderResult
import {-# SOURCE #-} qualified GI.OSTree.Structs.RepoPruneOptions as OSTree.RepoPruneOptions
import {-# SOURCE #-} qualified GI.OSTree.Structs.RepoTransactionStats as OSTree.RepoTransactionStats

#else
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.OSTree.Callbacks as OSTree.Callbacks
import {-# SOURCE #-} qualified GI.OSTree.Flags as OSTree.Flags
import {-# SOURCE #-} qualified GI.OSTree.Objects.Repo as OSTree.Repo
import {-# SOURCE #-} qualified GI.OSTree.Objects.SePolicy as OSTree.SePolicy
import {-# SOURCE #-} qualified GI.OSTree.Structs.RepoDevInoCache as OSTree.RepoDevInoCache

#endif

-- | Memory-managed wrapper type.
newtype RepoCommitModifier = RepoCommitModifier (SP.ManagedPtr RepoCommitModifier)
    deriving (RepoCommitModifier -> RepoCommitModifier -> Bool
(RepoCommitModifier -> RepoCommitModifier -> Bool)
-> (RepoCommitModifier -> RepoCommitModifier -> Bool)
-> Eq RepoCommitModifier
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RepoCommitModifier -> RepoCommitModifier -> Bool
== :: RepoCommitModifier -> RepoCommitModifier -> Bool
$c/= :: RepoCommitModifier -> RepoCommitModifier -> Bool
/= :: RepoCommitModifier -> RepoCommitModifier -> Bool
Eq)

instance SP.ManagedPtrNewtype RepoCommitModifier where
    toManagedPtr :: RepoCommitModifier -> ManagedPtr RepoCommitModifier
toManagedPtr (RepoCommitModifier ManagedPtr RepoCommitModifier
p) = ManagedPtr RepoCommitModifier
p

foreign import ccall "ostree_repo_commit_modifier_get_type" c_ostree_repo_commit_modifier_get_type :: 
    IO GType

type instance O.ParentTypes RepoCommitModifier = '[]
instance O.HasParentTypes RepoCommitModifier

instance B.Types.TypedObject RepoCommitModifier where
    glibType :: IO GType
glibType = IO GType
c_ostree_repo_commit_modifier_get_type

instance B.Types.GBoxed RepoCommitModifier

-- | Convert t'RepoCommitModifier' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe RepoCommitModifier) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_ostree_repo_commit_modifier_get_type
    gvalueSet_ :: Ptr GValue -> Maybe RepoCommitModifier -> IO ()
gvalueSet_ Ptr GValue
gv Maybe RepoCommitModifier
P.Nothing = Ptr GValue -> Ptr RepoCommitModifier -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr RepoCommitModifier
forall a. Ptr a
FP.nullPtr :: FP.Ptr RepoCommitModifier)
    gvalueSet_ Ptr GValue
gv (P.Just RepoCommitModifier
obj) = RepoCommitModifier -> (Ptr RepoCommitModifier -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr RepoCommitModifier
obj (Ptr GValue -> Ptr RepoCommitModifier -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe RepoCommitModifier)
gvalueGet_ Ptr GValue
gv = do
        ptr <- Ptr GValue -> IO (Ptr RepoCommitModifier)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr RepoCommitModifier)
        if ptr /= FP.nullPtr
        then P.Just <$> B.ManagedPtr.newBoxed RepoCommitModifier ptr
        else return P.Nothing
        
    


#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList RepoCommitModifier
type instance O.AttributeList RepoCommitModifier = RepoCommitModifierAttributeList
type RepoCommitModifierAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif

-- method RepoCommitModifier::new
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "flags"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "RepoCommitModifierFlags" }
--           , argCType = Just "OstreeRepoCommitModifierFlags"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Control options for filter"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "commit_filter"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "RepoCommitFilter" }
--           , argCType = Just "OstreeRepoCommitFilter"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Function that can inspect individual files"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , argCType = Just "gpointer"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "User data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy_notify"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "DestroyNotify" }
--           , argCType = Just "GDestroyNotify"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GDestroyNotify" , sinceVersion = Nothing }
--           , argScope = ScopeTypeAsync
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "OSTree" , name = "RepoCommitModifier" })
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_commit_modifier_new" ostree_repo_commit_modifier_new :: 
    CUInt ->                                -- flags : TInterface (Name {namespace = "OSTree", name = "RepoCommitModifierFlags"})
    FunPtr OSTree.Callbacks.C_RepoCommitFilter -> -- commit_filter : TInterface (Name {namespace = "OSTree", name = "RepoCommitFilter"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr GLib.Callbacks.C_DestroyNotify -> -- destroy_notify : TInterface (Name {namespace = "GLib", name = "DestroyNotify"})
    IO (Ptr RepoCommitModifier)

-- | /No description available in the introspection data./
repoCommitModifierNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    [OSTree.Flags.RepoCommitModifierFlags]
    -- ^ /@flags@/: Control options for filter
    -> Maybe (OSTree.Callbacks.RepoCommitFilter)
    -- ^ /@commitFilter@/: Function that can inspect individual files
    -> m RepoCommitModifier
    -- ^ __Returns:__ A new commit modifier.
repoCommitModifierNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
[RepoCommitModifierFlags]
-> Maybe RepoCommitFilter -> m RepoCommitModifier
repoCommitModifierNew [RepoCommitModifierFlags]
flags Maybe RepoCommitFilter
commitFilter = IO RepoCommitModifier -> m RepoCommitModifier
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RepoCommitModifier -> m RepoCommitModifier)
-> IO RepoCommitModifier -> m RepoCommitModifier
forall a b. (a -> b) -> a -> b
$ do
    let flags' :: CUInt
flags' = [RepoCommitModifierFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [RepoCommitModifierFlags]
flags
    maybeCommitFilter <- case Maybe RepoCommitFilter
commitFilter of
        Maybe RepoCommitFilter
Nothing -> FunPtr C_RepoCommitFilter -> IO (FunPtr C_RepoCommitFilter)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_RepoCommitFilter
forall a. FunPtr a
FP.nullFunPtr
        Just RepoCommitFilter
jCommitFilter -> do
            jCommitFilter' <- C_RepoCommitFilter -> IO (FunPtr C_RepoCommitFilter)
OSTree.Callbacks.mk_RepoCommitFilter (Maybe (Ptr (FunPtr C_RepoCommitFilter))
-> RepoCommitFilter_WithClosures -> C_RepoCommitFilter
OSTree.Callbacks.wrap_RepoCommitFilter Maybe (Ptr (FunPtr C_RepoCommitFilter))
forall a. Maybe a
Nothing (RepoCommitFilter -> RepoCommitFilter_WithClosures
OSTree.Callbacks.drop_closures_RepoCommitFilter RepoCommitFilter
jCommitFilter))
            return jCommitFilter'
    let userData = FunPtr C_RepoCommitFilter -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_RepoCommitFilter
maybeCommitFilter
    let destroyNotify = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
    result <- ostree_repo_commit_modifier_new flags' maybeCommitFilter userData destroyNotify
    checkUnexpectedReturnNULL "repoCommitModifierNew" result
    result' <- (wrapBoxed RepoCommitModifier) result
    return result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method RepoCommitModifier::ref
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "modifier"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "RepoCommitModifier" }
--           , argCType = Just "OstreeRepoCommitModifier*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "OSTree" , name = "RepoCommitModifier" })
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_commit_modifier_ref" ostree_repo_commit_modifier_ref :: 
    Ptr RepoCommitModifier ->               -- modifier : TInterface (Name {namespace = "OSTree", name = "RepoCommitModifier"})
    IO (Ptr RepoCommitModifier)

-- | /No description available in the introspection data./
repoCommitModifierRef ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    RepoCommitModifier
    -> m RepoCommitModifier
repoCommitModifierRef :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
RepoCommitModifier -> m RepoCommitModifier
repoCommitModifierRef RepoCommitModifier
modifier = IO RepoCommitModifier -> m RepoCommitModifier
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RepoCommitModifier -> m RepoCommitModifier)
-> IO RepoCommitModifier -> m RepoCommitModifier
forall a b. (a -> b) -> a -> b
$ do
    modifier' <- RepoCommitModifier -> IO (Ptr RepoCommitModifier)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoCommitModifier
modifier
    result <- ostree_repo_commit_modifier_ref modifier'
    checkUnexpectedReturnNULL "repoCommitModifierRef" result
    result' <- (wrapBoxed RepoCommitModifier) result
    touchManagedPtr modifier
    return result'

#if defined(ENABLE_OVERLOADING)
data RepoCommitModifierRefMethodInfo
instance (signature ~ (m RepoCommitModifier), MonadIO m) => O.OverloadedMethod RepoCommitModifierRefMethodInfo RepoCommitModifier signature where
    overloadedMethod = repoCommitModifierRef

instance O.OverloadedMethodInfo RepoCommitModifierRefMethodInfo RepoCommitModifier where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.RepoCommitModifier.repoCommitModifierRef",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Structs-RepoCommitModifier.html#v:repoCommitModifierRef"
        })


#endif

-- method RepoCommitModifier::set_devino_cache
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "modifier"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "RepoCommitModifier" }
--           , argCType = Just "OstreeRepoCommitModifier*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Modifier" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cache"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "RepoDevInoCache" }
--           , argCType = Just "OstreeRepoDevInoCache*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "A hash table caching device,inode to checksums"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_commit_modifier_set_devino_cache" ostree_repo_commit_modifier_set_devino_cache :: 
    Ptr RepoCommitModifier ->               -- modifier : TInterface (Name {namespace = "OSTree", name = "RepoCommitModifier"})
    Ptr OSTree.RepoDevInoCache.RepoDevInoCache -> -- cache : TInterface (Name {namespace = "OSTree", name = "RepoDevInoCache"})
    IO ()

-- | See the documentation for
-- @ostree_repo_devino_cache_new()@.  This function can
-- then be used for later calls to
-- @ostree_repo_write_directory_to_mtree()@ to optimize commits.
-- 
-- Note if your process has multiple writers, you should use separate
-- @OSTreeRepo@ instances if you want to also use this API.
-- 
-- This function will add a reference to /@cache@/ without copying - you
-- should avoid further mutation of the cache.
-- 
-- /Since: 2017.13/
repoCommitModifierSetDevinoCache ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    RepoCommitModifier
    -- ^ /@modifier@/: Modifier
    -> OSTree.RepoDevInoCache.RepoDevInoCache
    -- ^ /@cache@/: A hash table caching device,inode to checksums
    -> m ()
repoCommitModifierSetDevinoCache :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
RepoCommitModifier -> RepoDevInoCache -> m ()
repoCommitModifierSetDevinoCache RepoCommitModifier
modifier RepoDevInoCache
cache = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    modifier' <- RepoCommitModifier -> IO (Ptr RepoCommitModifier)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoCommitModifier
modifier
    cache' <- unsafeManagedPtrGetPtr cache
    ostree_repo_commit_modifier_set_devino_cache modifier' cache'
    touchManagedPtr modifier
    touchManagedPtr cache
    return ()

#if defined(ENABLE_OVERLOADING)
data RepoCommitModifierSetDevinoCacheMethodInfo
instance (signature ~ (OSTree.RepoDevInoCache.RepoDevInoCache -> m ()), MonadIO m) => O.OverloadedMethod RepoCommitModifierSetDevinoCacheMethodInfo RepoCommitModifier signature where
    overloadedMethod = repoCommitModifierSetDevinoCache

instance O.OverloadedMethodInfo RepoCommitModifierSetDevinoCacheMethodInfo RepoCommitModifier where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.RepoCommitModifier.repoCommitModifierSetDevinoCache",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Structs-RepoCommitModifier.html#v:repoCommitModifierSetDevinoCache"
        })


#endif

-- method RepoCommitModifier::set_sepolicy
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "modifier"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "RepoCommitModifier" }
--           , argCType = Just "OstreeRepoCommitModifier*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "An #OstreeRepoCommitModifier"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "sepolicy"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "SePolicy" }
--           , argCType = Just "OstreeSePolicy*"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Policy to use for labeling"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_commit_modifier_set_sepolicy" ostree_repo_commit_modifier_set_sepolicy :: 
    Ptr RepoCommitModifier ->               -- modifier : TInterface (Name {namespace = "OSTree", name = "RepoCommitModifier"})
    Ptr OSTree.SePolicy.SePolicy ->         -- sepolicy : TInterface (Name {namespace = "OSTree", name = "SePolicy"})
    IO ()

-- | If /@policy@/ is non-'P.Nothing', use it to look up labels to use for
-- \"security.selinux\" extended attributes.
-- 
-- Note that any policy specified this way operates in addition to any
-- extended attributes provided via
-- 'GI.OSTree.Structs.RepoCommitModifier.repoCommitModifierSetXattrCallback'.  However if both
-- specify a value for \"security.selinux\", then the one from the
-- policy wins.
repoCommitModifierSetSepolicy ::
    (B.CallStack.HasCallStack, MonadIO m, OSTree.SePolicy.IsSePolicy a) =>
    RepoCommitModifier
    -- ^ /@modifier@/: An t'GI.OSTree.Structs.RepoCommitModifier.RepoCommitModifier'
    -> Maybe (a)
    -- ^ /@sepolicy@/: Policy to use for labeling
    -> m ()
repoCommitModifierSetSepolicy :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSePolicy a) =>
RepoCommitModifier -> Maybe a -> m ()
repoCommitModifierSetSepolicy RepoCommitModifier
modifier Maybe a
sepolicy = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    modifier' <- RepoCommitModifier -> IO (Ptr RepoCommitModifier)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoCommitModifier
modifier
    maybeSepolicy <- case sepolicy of
        Maybe a
Nothing -> Ptr SePolicy -> IO (Ptr SePolicy)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr SePolicy
forall a. Ptr a
FP.nullPtr
        Just a
jSepolicy -> do
            jSepolicy' <- a -> IO (Ptr SePolicy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jSepolicy
            return jSepolicy'
    ostree_repo_commit_modifier_set_sepolicy modifier' maybeSepolicy
    touchManagedPtr modifier
    whenJust sepolicy touchManagedPtr
    return ()

#if defined(ENABLE_OVERLOADING)
data RepoCommitModifierSetSepolicyMethodInfo
instance (signature ~ (Maybe (a) -> m ()), MonadIO m, OSTree.SePolicy.IsSePolicy a) => O.OverloadedMethod RepoCommitModifierSetSepolicyMethodInfo RepoCommitModifier signature where
    overloadedMethod = repoCommitModifierSetSepolicy

instance O.OverloadedMethodInfo RepoCommitModifierSetSepolicyMethodInfo RepoCommitModifier where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.RepoCommitModifier.repoCommitModifierSetSepolicy",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Structs-RepoCommitModifier.html#v:repoCommitModifierSetSepolicy"
        })


#endif

-- method RepoCommitModifier::set_sepolicy_from_commit
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "modifier"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "RepoCommitModifier" }
--           , argCType = Just "OstreeRepoCommitModifier*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Commit modifier" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "repo"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Repo" }
--           , argCType = Just "OstreeRepo*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "OSTree repo containing @rev"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "rev"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const char*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Find SELinux policy from this base commit"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , argCType = Just "GCancellable*"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "ostree_repo_commit_modifier_set_sepolicy_from_commit" ostree_repo_commit_modifier_set_sepolicy_from_commit :: 
    Ptr RepoCommitModifier ->               -- modifier : TInterface (Name {namespace = "OSTree", name = "RepoCommitModifier"})
    Ptr OSTree.Repo.Repo ->                 -- repo : TInterface (Name {namespace = "OSTree", name = "Repo"})
    CString ->                              -- rev : TBasicType TUTF8
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | In many cases, one wants to create a \"derived\" commit from base commit.
-- SELinux policy labels are part of that base commit.  This API allows
-- one to easily set up SELinux labeling from a base commit.
-- 
-- /Since: 2020.4/
repoCommitModifierSetSepolicyFromCommit ::
    (B.CallStack.HasCallStack, MonadIO m, OSTree.Repo.IsRepo a, Gio.Cancellable.IsCancellable b) =>
    RepoCommitModifier
    -- ^ /@modifier@/: Commit modifier
    -> a
    -- ^ /@repo@/: OSTree repo containing /@rev@/
    -> T.Text
    -- ^ /@rev@/: Find SELinux policy from this base commit
    -> Maybe (b)
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
repoCommitModifierSetSepolicyFromCommit :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsRepo a, IsCancellable b) =>
RepoCommitModifier -> a -> Text -> Maybe b -> m ()
repoCommitModifierSetSepolicyFromCommit RepoCommitModifier
modifier a
repo Text
rev Maybe b
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    modifier' <- RepoCommitModifier -> IO (Ptr RepoCommitModifier)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoCommitModifier
modifier
    repo' <- unsafeManagedPtrCastPtr repo
    rev' <- textToCString rev
    maybeCancellable <- case cancellable of
        Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
        Just b
jCancellable -> do
            jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            return jCancellable'
    onException (do
        _ <- propagateGError $ ostree_repo_commit_modifier_set_sepolicy_from_commit modifier' repo' rev' maybeCancellable
        touchManagedPtr modifier
        touchManagedPtr repo
        whenJust cancellable touchManagedPtr
        freeMem rev'
        return ()
     ) (do
        freeMem rev'
     )

#if defined(ENABLE_OVERLOADING)
data RepoCommitModifierSetSepolicyFromCommitMethodInfo
instance (signature ~ (a -> T.Text -> Maybe (b) -> m ()), MonadIO m, OSTree.Repo.IsRepo a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod RepoCommitModifierSetSepolicyFromCommitMethodInfo RepoCommitModifier signature where
    overloadedMethod = repoCommitModifierSetSepolicyFromCommit

instance O.OverloadedMethodInfo RepoCommitModifierSetSepolicyFromCommitMethodInfo RepoCommitModifier where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.RepoCommitModifier.repoCommitModifierSetSepolicyFromCommit",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Structs-RepoCommitModifier.html#v:repoCommitModifierSetSepolicyFromCommit"
        })


#endif

-- method RepoCommitModifier::set_xattr_callback
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "modifier"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "RepoCommitModifier" }
--           , argCType = Just "OstreeRepoCommitModifier*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "An #OstreeRepoCommitModifier"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "OSTree" , name = "RepoCommitModifierXattrCallback" }
--           , argCType = Just "OstreeRepoCommitModifierXattrCallback"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Function to be invoked, should return extended attributes for path"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeNotified
--           , argClosure = 3
--           , argDestroy = 2
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "DestroyNotify" }
--           , argCType = Just "GDestroyNotify"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Destroy notification"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , argCType = Just "gpointer"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Data for @callback:"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_commit_modifier_set_xattr_callback" ostree_repo_commit_modifier_set_xattr_callback :: 
    Ptr RepoCommitModifier ->               -- modifier : TInterface (Name {namespace = "OSTree", name = "RepoCommitModifier"})
    FunPtr OSTree.Callbacks.C_RepoCommitModifierXattrCallback -> -- callback : TInterface (Name {namespace = "OSTree", name = "RepoCommitModifierXattrCallback"})
    FunPtr GLib.Callbacks.C_DestroyNotify -> -- destroy : TInterface (Name {namespace = "GLib", name = "DestroyNotify"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO ()

-- | If set, this function should return extended attributes to use for
-- the given path.  This is useful for things like ACLs and SELinux,
-- where a build system can label the files as it\'s committing to the
-- repository.
repoCommitModifierSetXattrCallback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    RepoCommitModifier
    -- ^ /@modifier@/: An t'GI.OSTree.Structs.RepoCommitModifier.RepoCommitModifier'
    -> OSTree.Callbacks.RepoCommitModifierXattrCallback
    -- ^ /@callback@/: Function to be invoked, should return extended attributes for path
    -> m ()
repoCommitModifierSetXattrCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
RepoCommitModifier -> RepoCommitModifierXattrCallback -> m ()
repoCommitModifierSetXattrCallback RepoCommitModifier
modifier RepoCommitModifierXattrCallback
callback = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    modifier' <- RepoCommitModifier -> IO (Ptr RepoCommitModifier)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoCommitModifier
modifier
    callback' <- OSTree.Callbacks.mk_RepoCommitModifierXattrCallback (OSTree.Callbacks.wrap_RepoCommitModifierXattrCallback Nothing (OSTree.Callbacks.drop_closures_RepoCommitModifierXattrCallback callback))
    let userData = FunPtr C_RepoCommitModifierXattrCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_RepoCommitModifierXattrCallback
callback'
    let destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
    ostree_repo_commit_modifier_set_xattr_callback modifier' callback' destroy userData
    touchManagedPtr modifier
    return ()

#if defined(ENABLE_OVERLOADING)
data RepoCommitModifierSetXattrCallbackMethodInfo
instance (signature ~ (OSTree.Callbacks.RepoCommitModifierXattrCallback -> m ()), MonadIO m) => O.OverloadedMethod RepoCommitModifierSetXattrCallbackMethodInfo RepoCommitModifier signature where
    overloadedMethod = repoCommitModifierSetXattrCallback

instance O.OverloadedMethodInfo RepoCommitModifierSetXattrCallbackMethodInfo RepoCommitModifier where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.RepoCommitModifier.repoCommitModifierSetXattrCallback",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Structs-RepoCommitModifier.html#v:repoCommitModifierSetXattrCallback"
        })


#endif

-- method RepoCommitModifier::unref
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "modifier"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "RepoCommitModifier" }
--           , argCType = Just "OstreeRepoCommitModifier*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_commit_modifier_unref" ostree_repo_commit_modifier_unref :: 
    Ptr RepoCommitModifier ->               -- modifier : TInterface (Name {namespace = "OSTree", name = "RepoCommitModifier"})
    IO ()

-- | /No description available in the introspection data./
repoCommitModifierUnref ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    RepoCommitModifier
    -> m ()
repoCommitModifierUnref :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
RepoCommitModifier -> m ()
repoCommitModifierUnref RepoCommitModifier
modifier = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    modifier' <- RepoCommitModifier -> IO (Ptr RepoCommitModifier)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RepoCommitModifier
modifier
    ostree_repo_commit_modifier_unref modifier'
    touchManagedPtr modifier
    return ()

#if defined(ENABLE_OVERLOADING)
data RepoCommitModifierUnrefMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod RepoCommitModifierUnrefMethodInfo RepoCommitModifier signature where
    overloadedMethod = repoCommitModifierUnref

instance O.OverloadedMethodInfo RepoCommitModifierUnrefMethodInfo RepoCommitModifier where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.RepoCommitModifier.repoCommitModifierUnref",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.19/docs/GI-OSTree-Structs-RepoCommitModifier.html#v:repoCommitModifierUnref"
        })


#endif

#if defined(ENABLE_OVERLOADING)
type family ResolveRepoCommitModifierMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolveRepoCommitModifierMethod "ref" o = RepoCommitModifierRefMethodInfo
    ResolveRepoCommitModifierMethod "unref" o = RepoCommitModifierUnrefMethodInfo
    ResolveRepoCommitModifierMethod "setDevinoCache" o = RepoCommitModifierSetDevinoCacheMethodInfo
    ResolveRepoCommitModifierMethod "setSepolicy" o = RepoCommitModifierSetSepolicyMethodInfo
    ResolveRepoCommitModifierMethod "setSepolicyFromCommit" o = RepoCommitModifierSetSepolicyFromCommitMethodInfo
    ResolveRepoCommitModifierMethod "setXattrCallback" o = RepoCommitModifierSetXattrCallbackMethodInfo
    ResolveRepoCommitModifierMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveRepoCommitModifierMethod t RepoCommitModifier, O.OverloadedMethod info RepoCommitModifier p) => OL.IsLabel t (RepoCommitModifier -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveRepoCommitModifierMethod t RepoCommitModifier, O.OverloadedMethod info RepoCommitModifier p, R.HasField t RepoCommitModifier p) => R.HasField t RepoCommitModifier p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveRepoCommitModifierMethod t RepoCommitModifier, O.OverloadedMethodInfo info RepoCommitModifier) => OL.IsLabel t (O.MethodProxy info RepoCommitModifier) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif