Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
Represents the changes done to one file.
Synopsis
- newtype DiffDelta = DiffDelta (ManagedPtr DiffDelta)
- noDiffDelta :: Maybe DiffDelta
- diffDeltaGetFlags :: (HasCallStack, MonadIO m) => DiffDelta -> m [DiffFlag]
- diffDeltaGetNewFile :: (HasCallStack, MonadIO m) => DiffDelta -> m (Maybe DiffFile)
- diffDeltaGetOldFile :: (HasCallStack, MonadIO m) => DiffDelta -> m (Maybe DiffFile)
- diffDeltaGetSimilarity :: (HasCallStack, MonadIO m) => DiffDelta -> m Word32
- diffDeltaGetStatus :: (HasCallStack, MonadIO m) => DiffDelta -> m DeltaType
- diffDeltaRef :: (HasCallStack, MonadIO m) => DiffDelta -> m (Maybe DiffDelta)
- diffDeltaUnref :: (HasCallStack, MonadIO m) => DiffDelta -> m ()
Exported types
Memory-managed wrapper type.
Instances
BoxedObject DiffDelta Source # | |
Methods
getFlags
:: (HasCallStack, MonadIO m) | |
=> DiffDelta |
|
-> m [DiffFlag] | Returns: the delta flags |
Gets flags for delta
.
getNewFile
:: (HasCallStack, MonadIO m) | |
=> DiffDelta |
|
-> m (Maybe DiffFile) | Returns: the delta's new file or |
Gets the new file for delta
.
getOldFile
:: (HasCallStack, MonadIO m) | |
=> DiffDelta |
|
-> m (Maybe DiffFile) | Returns: the delta's old file or |
Gets the old file for delta
.
getSimilarity
diffDeltaGetSimilarity Source #
:: (HasCallStack, MonadIO m) | |
=> DiffDelta |
|
-> m Word32 | Returns: the delta's similarity. |
Gets the similarity between delta
files.
getStatus
:: (HasCallStack, MonadIO m) | |
=> DiffDelta |
|
-> m DeltaType | Returns: the delta's status. |
Gets the DeltaType
for delta
.
ref
Atomically increments the reference count of delta
by one.
This function is MT-safe and may be called from any thread.
unref
:: (HasCallStack, MonadIO m) | |
=> DiffDelta |
|
-> m () |
Atomically decrements the reference count of delta
by one.
If the reference count drops to 0, delta
is freed.