Copyright | (c) 2020-2021 Vaclav Svejcar |
---|---|
License | BSD-3-Clause |
Maintainer | vaclav.svejcar@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module contains type class representing the selected type of VCS repository.
Documentation
Type class representing instance of VCS repository of selected type.
In order to obtain instance, the physical repository needs to be scanned
first by the scanRepo
method. Then absolute path to the repository root is
provided by repoRoot
method. To check if any path (relative to the repo
root) is ignored or not, use the isIgnored
method.
:: r | VCS repository instance |
-> Text | name of the repository |
Returns name of the repository (e.g. GIT
).
:: r | VCS repository instance |
-> FilePath | absolute path to the repository |
Returns absolute path to the root of the VCS repository.
:: (MonadIO m, MonadThrow m) | |
=> FilePath | path to the VCS repository root |
-> m r | scanned repository (or failure) |
Scans repository at given path. If the given path doesn't contain valid
repository, RepoError
may be thrown.
:: MonadIO m | |
=> r | VCS repository instance |
-> FilePath | path to check, relative to the repository root |
-> m Bool | whether the path is ignored or not |
Checks whether the given path is ignored. The input path is expected to be relative to the repository root, it might or might not point to existing file or directory.
Represents error related to operations over the VCS repository.
InvalidRepo FilePath Text | Given |
Instances
Eq RepoError Source # | |
Show RepoError Source # | |
Exception RepoError Source # | |
Defined in Data.VCS.Ignore.Repo toException :: RepoError -> SomeException # fromException :: SomeException -> Maybe RepoError # displayException :: RepoError -> String # |