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 |
This represents the configuration for a single remote repository. Currently, remotes can only be passed around as (reference counted) opaque handles. In future, more API may be added to create and interrogate them.
Since: 2018.6
Synopsis
- newtype Remote = Remote (ManagedPtr Remote)
- noRemote :: Maybe Remote
- remoteGetName :: (HasCallStack, MonadIO m) => Remote -> m Text
- remoteGetUrl :: (HasCallStack, MonadIO m) => Remote -> m Text
- remoteRef :: (HasCallStack, MonadIO m) => Remote -> m Remote
- remoteUnref :: (HasCallStack, MonadIO m) => Remote -> m ()
Exported types
Memory-managed wrapper type.
Methods
getName
:: (HasCallStack, MonadIO m) | |
=> Remote |
|
-> m Text | Returns: remote’s name |
Get the human-readable name of the remote. This is what the user configured, if the remote was explicitly configured; and will otherwise be a stable, arbitrary, string.
Since: 2018.6
getUrl
:: (HasCallStack, MonadIO m) | |
=> Remote |
|
-> m Text | Returns: the remote's URL |
Get the URL from the remote.
Since: 2018.6
ref
:: (HasCallStack, MonadIO m) | |
=> Remote |
|
-> m Remote | Returns: a copy of |
Increase the reference count on the given remote
.
Since: 2018.6
unref
:: (HasCallStack, MonadIO m) | |
=> Remote |
|
-> m () |
Decrease the reference count on the given remote
and free it if the
reference count reaches 0.
Since: 2018.6