Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
Represents the hunk of a diff.
Synopsis
- newtype DiffHunk = DiffHunk (ManagedPtr DiffHunk)
- diffHunkGetHeader :: (HasCallStack, MonadIO m) => DiffHunk -> m Text
- diffHunkGetNewLines :: (HasCallStack, MonadIO m) => DiffHunk -> m Int32
- diffHunkGetNewStart :: (HasCallStack, MonadIO m) => DiffHunk -> m Int32
- diffHunkGetOldLines :: (HasCallStack, MonadIO m) => DiffHunk -> m Int32
- diffHunkGetOldStart :: (HasCallStack, MonadIO m) => DiffHunk -> m Int32
- diffHunkRef :: (HasCallStack, MonadIO m) => DiffHunk -> m (Maybe DiffHunk)
- diffHunkUnref :: (HasCallStack, MonadIO m) => DiffHunk -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq DiffHunk Source # | |
GBoxed DiffHunk Source # | |
Defined in GI.Ggit.Structs.DiffHunk | |
ManagedPtrNewtype DiffHunk Source # | |
Defined in GI.Ggit.Structs.DiffHunk toManagedPtr :: DiffHunk -> ManagedPtr DiffHunk | |
TypedObject DiffHunk Source # | |
Defined in GI.Ggit.Structs.DiffHunk glibType :: IO GType | |
IsGValue DiffHunk Source # | Convert |
Defined in GI.Ggit.Structs.DiffHunk toGValue :: DiffHunk -> IO GValue fromGValue :: GValue -> IO DiffHunk | |
HasParentTypes DiffHunk Source # | |
Defined in GI.Ggit.Structs.DiffHunk | |
type ParentTypes DiffHunk Source # | |
Defined in GI.Ggit.Structs.DiffHunk type ParentTypes DiffHunk = '[] :: [Type] |
Methods
Overloaded methods
getHeader
diffHunkGetHeader :: (HasCallStack, MonadIO m) => DiffHunk -> m Text Source #
No description available in the introspection data.
getNewLines
:: (HasCallStack, MonadIO m) | |
=> DiffHunk |
|
-> m Int32 | Returns: the number of lines in the new file. |
Gets the number of lines in the new file.
getNewStart
:: (HasCallStack, MonadIO m) | |
=> DiffHunk |
|
-> m Int32 | Returns: the starting line number in the new file. |
Gets the starting line number in the new file.
getOldLines
:: (HasCallStack, MonadIO m) | |
=> DiffHunk |
|
-> m Int32 | Returns: the number of lines in the old file. |
Gets the number of lines in the old file.
getOldStart
:: (HasCallStack, MonadIO m) | |
=> DiffHunk |
|
-> m Int32 | Returns: the starting line number in the old file. |
Gets the starting line number in the old file.
ref
:: (HasCallStack, MonadIO m) | |
=> DiffHunk |
|
-> m (Maybe DiffHunk) | Returns: a |
Atomically increments the reference count of hunk
by one.
This function is MT-safe and may be called from any thread.