Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
Represents the hunk of a diff.
Synopsis
- newtype DiffHunk = DiffHunk (ManagedPtr DiffHunk)
- noDiffHunk :: Maybe 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
BoxedObject DiffHunk Source # | |
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
Atomically increments the reference count of hunk
by one.
This function is MT-safe and may be called from any thread.
unref
:: (HasCallStack, MonadIO m) | |
=> DiffHunk |
|
-> m () |
Atomically decrements the reference count of hunk
by one.
If the reference count drops to 0, hunk
is freed.