{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Ggit.Structs.Reflog
(
Reflog(..) ,
#if defined(ENABLE_OVERLOADING)
ResolveReflogMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ReflogAppendMethodInfo ,
#endif
reflogAppend ,
#if defined(ENABLE_OVERLOADING)
ReflogGetEntryCountMethodInfo ,
#endif
reflogGetEntryCount ,
#if defined(ENABLE_OVERLOADING)
ReflogGetEntryFromIndexMethodInfo ,
#endif
reflogGetEntryFromIndex ,
#if defined(ENABLE_OVERLOADING)
ReflogRefMethodInfo ,
#endif
reflogRef ,
#if defined(ENABLE_OVERLOADING)
ReflogRenameMethodInfo ,
#endif
reflogRename ,
#if defined(ENABLE_OVERLOADING)
ReflogUnrefMethodInfo ,
#endif
reflogUnref ,
#if defined(ENABLE_OVERLOADING)
ReflogWriteMethodInfo ,
#endif
reflogWrite ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import {-# SOURCE #-} qualified GI.Ggit.Objects.Signature as Ggit.Signature
import {-# SOURCE #-} qualified GI.Ggit.Structs.OId as Ggit.OId
import {-# SOURCE #-} qualified GI.Ggit.Structs.ReflogEntry as Ggit.ReflogEntry
newtype Reflog = Reflog (SP.ManagedPtr Reflog)
deriving (Reflog -> Reflog -> Bool
(Reflog -> Reflog -> Bool)
-> (Reflog -> Reflog -> Bool) -> Eq Reflog
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Reflog -> Reflog -> Bool
$c/= :: Reflog -> Reflog -> Bool
== :: Reflog -> Reflog -> Bool
$c== :: Reflog -> Reflog -> Bool
Eq)
instance SP.ManagedPtrNewtype Reflog where
toManagedPtr :: Reflog -> ManagedPtr Reflog
toManagedPtr (Reflog ManagedPtr Reflog
p) = ManagedPtr Reflog
p
foreign import ccall "ggit_reflog_get_type" c_ggit_reflog_get_type ::
IO GType
type instance O.ParentTypes Reflog = '[]
instance O.HasParentTypes Reflog
instance B.Types.TypedObject Reflog where
glibType :: IO GType
glibType = IO GType
c_ggit_reflog_get_type
instance B.Types.GBoxed Reflog
instance B.GValue.IsGValue (Maybe Reflog) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_ggit_reflog_get_type
gvalueSet_ :: Ptr GValue -> Maybe Reflog -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Reflog
P.Nothing = Ptr GValue -> Ptr Reflog -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr Reflog
forall a. Ptr a
FP.nullPtr :: FP.Ptr Reflog)
gvalueSet_ Ptr GValue
gv (P.Just Reflog
obj) = Reflog -> (Ptr Reflog -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Reflog
obj (Ptr GValue -> Ptr Reflog -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Reflog)
gvalueGet_ Ptr GValue
gv = do
Ptr Reflog
ptr <- Ptr GValue -> IO (Ptr Reflog)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr Reflog)
if Ptr Reflog
ptr Ptr Reflog -> Ptr Reflog -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Reflog
forall a. Ptr a
FP.nullPtr
then Reflog -> Maybe Reflog
forall a. a -> Maybe a
P.Just (Reflog -> Maybe Reflog) -> IO Reflog -> IO (Maybe Reflog)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Reflog -> Reflog) -> Ptr Reflog -> IO Reflog
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr Reflog -> Reflog
Reflog Ptr Reflog
ptr
else Maybe Reflog -> IO (Maybe Reflog)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Reflog
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Reflog
type instance O.AttributeList Reflog = ReflogAttributeList
type ReflogAttributeList = ('[ ] :: [(Symbol, *)])
#endif
foreign import ccall "ggit_reflog_append" ggit_reflog_append ::
Ptr Reflog ->
Ptr Ggit.OId.OId ->
Ptr Ggit.Signature.Signature ->
CString ->
Ptr (Ptr GError) ->
IO CInt
reflogAppend ::
(B.CallStack.HasCallStack, MonadIO m, Ggit.Signature.IsSignature a) =>
Reflog
-> Ggit.OId.OId
-> a
-> T.Text
-> m ()
reflogAppend :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSignature a) =>
Reflog -> OId -> a -> Text -> m ()
reflogAppend Reflog
reflog OId
oid a
committer Text
message = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Reflog
reflog' <- Reflog -> IO (Ptr Reflog)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Reflog
reflog
Ptr OId
oid' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
oid
Ptr Signature
committer' <- a -> IO (Ptr Signature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
committer
CString
message' <- Text -> IO CString
textToCString Text
message
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Reflog
-> Ptr OId
-> Ptr Signature
-> CString
-> Ptr (Ptr GError)
-> IO CInt
ggit_reflog_append Ptr Reflog
reflog' Ptr OId
oid' Ptr Signature
committer' CString
message'
Reflog -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Reflog
reflog
OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OId
oid
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
committer
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
)
#if defined(ENABLE_OVERLOADING)
data ReflogAppendMethodInfo
instance (signature ~ (Ggit.OId.OId -> a -> T.Text -> m ()), MonadIO m, Ggit.Signature.IsSignature a) => O.OverloadedMethod ReflogAppendMethodInfo Reflog signature where
overloadedMethod = reflogAppend
instance O.OverloadedMethodInfo ReflogAppendMethodInfo Reflog where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Ggit.Structs.Reflog.reflogAppend",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Structs-Reflog.html#v:reflogAppend"
})
#endif
foreign import ccall "ggit_reflog_get_entry_count" ggit_reflog_get_entry_count ::
Ptr Reflog ->
IO Word32
reflogGetEntryCount ::
(B.CallStack.HasCallStack, MonadIO m) =>
Reflog
-> m Word32
reflogGetEntryCount :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Reflog -> m Word32
reflogGetEntryCount Reflog
reflog = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr Reflog
reflog' <- Reflog -> IO (Ptr Reflog)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Reflog
reflog
Word32
result <- Ptr Reflog -> IO Word32
ggit_reflog_get_entry_count Ptr Reflog
reflog'
Reflog -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Reflog
reflog
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data ReflogGetEntryCountMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.OverloadedMethod ReflogGetEntryCountMethodInfo Reflog signature where
overloadedMethod = reflogGetEntryCount
instance O.OverloadedMethodInfo ReflogGetEntryCountMethodInfo Reflog where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Ggit.Structs.Reflog.reflogGetEntryCount",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Structs-Reflog.html#v:reflogGetEntryCount"
})
#endif
foreign import ccall "ggit_reflog_get_entry_from_index" ggit_reflog_get_entry_from_index ::
Ptr Reflog ->
Word32 ->
IO (Ptr Ggit.ReflogEntry.ReflogEntry)
reflogGetEntryFromIndex ::
(B.CallStack.HasCallStack, MonadIO m) =>
Reflog
-> Word32
-> m (Maybe Ggit.ReflogEntry.ReflogEntry)
reflogGetEntryFromIndex :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Reflog -> Word32 -> m (Maybe ReflogEntry)
reflogGetEntryFromIndex Reflog
reflog Word32
idx = IO (Maybe ReflogEntry) -> m (Maybe ReflogEntry)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe ReflogEntry) -> m (Maybe ReflogEntry))
-> IO (Maybe ReflogEntry) -> m (Maybe ReflogEntry)
forall a b. (a -> b) -> a -> b
$ do
Ptr Reflog
reflog' <- Reflog -> IO (Ptr Reflog)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Reflog
reflog
Ptr ReflogEntry
result <- Ptr Reflog -> Word32 -> IO (Ptr ReflogEntry)
ggit_reflog_get_entry_from_index Ptr Reflog
reflog' Word32
idx
Maybe ReflogEntry
maybeResult <- Ptr ReflogEntry
-> (Ptr ReflogEntry -> IO ReflogEntry) -> IO (Maybe ReflogEntry)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr ReflogEntry
result ((Ptr ReflogEntry -> IO ReflogEntry) -> IO (Maybe ReflogEntry))
-> (Ptr ReflogEntry -> IO ReflogEntry) -> IO (Maybe ReflogEntry)
forall a b. (a -> b) -> a -> b
$ \Ptr ReflogEntry
result' -> do
ReflogEntry
result'' <- ((ManagedPtr ReflogEntry -> ReflogEntry)
-> Ptr ReflogEntry -> IO ReflogEntry
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr ReflogEntry -> ReflogEntry
Ggit.ReflogEntry.ReflogEntry) Ptr ReflogEntry
result'
ReflogEntry -> IO ReflogEntry
forall (m :: * -> *) a. Monad m => a -> m a
return ReflogEntry
result''
Reflog -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Reflog
reflog
Maybe ReflogEntry -> IO (Maybe ReflogEntry)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ReflogEntry
maybeResult
#if defined(ENABLE_OVERLOADING)
data ReflogGetEntryFromIndexMethodInfo
instance (signature ~ (Word32 -> m (Maybe Ggit.ReflogEntry.ReflogEntry)), MonadIO m) => O.OverloadedMethod ReflogGetEntryFromIndexMethodInfo Reflog signature where
overloadedMethod = reflogGetEntryFromIndex
instance O.OverloadedMethodInfo ReflogGetEntryFromIndexMethodInfo Reflog where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Ggit.Structs.Reflog.reflogGetEntryFromIndex",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Structs-Reflog.html#v:reflogGetEntryFromIndex"
})
#endif
foreign import ccall "ggit_reflog_ref" ggit_reflog_ref ::
Ptr Reflog ->
IO (Ptr Reflog)
reflogRef ::
(B.CallStack.HasCallStack, MonadIO m) =>
Reflog
-> m (Maybe Reflog)
reflogRef :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Reflog -> m (Maybe Reflog)
reflogRef Reflog
reflog = IO (Maybe Reflog) -> m (Maybe Reflog)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Reflog) -> m (Maybe Reflog))
-> IO (Maybe Reflog) -> m (Maybe Reflog)
forall a b. (a -> b) -> a -> b
$ do
Ptr Reflog
reflog' <- Reflog -> IO (Ptr Reflog)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Reflog
reflog
Ptr Reflog
result <- Ptr Reflog -> IO (Ptr Reflog)
ggit_reflog_ref Ptr Reflog
reflog'
Maybe Reflog
maybeResult <- Ptr Reflog -> (Ptr Reflog -> IO Reflog) -> IO (Maybe Reflog)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Reflog
result ((Ptr Reflog -> IO Reflog) -> IO (Maybe Reflog))
-> (Ptr Reflog -> IO Reflog) -> IO (Maybe Reflog)
forall a b. (a -> b) -> a -> b
$ \Ptr Reflog
result' -> do
Reflog
result'' <- ((ManagedPtr Reflog -> Reflog) -> Ptr Reflog -> IO Reflog
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Reflog -> Reflog
Reflog) Ptr Reflog
result'
Reflog -> IO Reflog
forall (m :: * -> *) a. Monad m => a -> m a
return Reflog
result''
Reflog -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Reflog
reflog
Maybe Reflog -> IO (Maybe Reflog)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Reflog
maybeResult
#if defined(ENABLE_OVERLOADING)
data ReflogRefMethodInfo
instance (signature ~ (m (Maybe Reflog)), MonadIO m) => O.OverloadedMethod ReflogRefMethodInfo Reflog signature where
overloadedMethod = reflogRef
instance O.OverloadedMethodInfo ReflogRefMethodInfo Reflog where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Ggit.Structs.Reflog.reflogRef",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Structs-Reflog.html#v:reflogRef"
})
#endif
foreign import ccall "ggit_reflog_rename" ggit_reflog_rename ::
Ptr Reflog ->
CString ->
Ptr (Ptr GError) ->
IO CInt
reflogRename ::
(B.CallStack.HasCallStack, MonadIO m) =>
Reflog
-> T.Text
-> m ()
reflogRename :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Reflog -> Text -> m ()
reflogRename Reflog
reflog Text
newName = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Reflog
reflog' <- Reflog -> IO (Ptr Reflog)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Reflog
reflog
CString
newName' <- Text -> IO CString
textToCString Text
newName
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Reflog -> CString -> Ptr (Ptr GError) -> IO CInt
ggit_reflog_rename Ptr Reflog
reflog' CString
newName'
Reflog -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Reflog
reflog
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
newName'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
newName'
)
#if defined(ENABLE_OVERLOADING)
data ReflogRenameMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m) => O.OverloadedMethod ReflogRenameMethodInfo Reflog signature where
overloadedMethod = reflogRename
instance O.OverloadedMethodInfo ReflogRenameMethodInfo Reflog where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Ggit.Structs.Reflog.reflogRename",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Structs-Reflog.html#v:reflogRename"
})
#endif
foreign import ccall "ggit_reflog_unref" ggit_reflog_unref ::
Ptr Reflog ->
IO ()
reflogUnref ::
(B.CallStack.HasCallStack, MonadIO m) =>
Reflog
-> m ()
reflogUnref :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Reflog -> m ()
reflogUnref Reflog
reflog = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Reflog
reflog' <- Reflog -> IO (Ptr Reflog)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Reflog
reflog
Ptr Reflog -> IO ()
ggit_reflog_unref Ptr Reflog
reflog'
Reflog -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Reflog
reflog
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ReflogUnrefMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod ReflogUnrefMethodInfo Reflog signature where
overloadedMethod = reflogUnref
instance O.OverloadedMethodInfo ReflogUnrefMethodInfo Reflog where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Ggit.Structs.Reflog.reflogUnref",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Structs-Reflog.html#v:reflogUnref"
})
#endif
foreign import ccall "ggit_reflog_write" ggit_reflog_write ::
Ptr Reflog ->
Ptr (Ptr GError) ->
IO CInt
reflogWrite ::
(B.CallStack.HasCallStack, MonadIO m) =>
Reflog
-> m ()
reflogWrite :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Reflog -> m ()
reflogWrite Reflog
reflog = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Reflog
reflog' <- Reflog -> IO (Ptr Reflog)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Reflog
reflog
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Reflog -> Ptr (Ptr GError) -> IO CInt
ggit_reflog_write Ptr Reflog
reflog'
Reflog -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Reflog
reflog
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data ReflogWriteMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod ReflogWriteMethodInfo Reflog signature where
overloadedMethod = reflogWrite
instance O.OverloadedMethodInfo ReflogWriteMethodInfo Reflog where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Ggit.Structs.Reflog.reflogWrite",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ggit-1.0.11/docs/GI-Ggit-Structs-Reflog.html#v:reflogWrite"
})
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveReflogMethod (t :: Symbol) (o :: *) :: * where
ResolveReflogMethod "append" o = ReflogAppendMethodInfo
ResolveReflogMethod "ref" o = ReflogRefMethodInfo
ResolveReflogMethod "rename" o = ReflogRenameMethodInfo
ResolveReflogMethod "unref" o = ReflogUnrefMethodInfo
ResolveReflogMethod "write" o = ReflogWriteMethodInfo
ResolveReflogMethod "getEntryCount" o = ReflogGetEntryCountMethodInfo
ResolveReflogMethod "getEntryFromIndex" o = ReflogGetEntryFromIndexMethodInfo
ResolveReflogMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveReflogMethod t Reflog, O.OverloadedMethod info Reflog p) => OL.IsLabel t (Reflog -> 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 ~ ResolveReflogMethod t Reflog, O.OverloadedMethod info Reflog p, R.HasField t Reflog p) => R.HasField t Reflog p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveReflogMethod t Reflog, O.OverloadedMethodInfo info Reflog) => OL.IsLabel t (O.MethodProxy info Reflog) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif