update-nix-fetchgit-0.1.2.0: A program to update fetchgit values in Nix expressions

Safe HaskellNone
LanguageHaskell2010

Update.Nix.FetchGit.Utils

Synopsis

Documentation

data RepoLocation Source #

A repo is either specified by URL or by Github owner/repo.

Constructors

URL Text 
GitHub 

Fields

GitLab 

Fields

Instances
Data RepoLocation Source # 
Instance details

Defined in Update.Nix.FetchGit.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RepoLocation -> c RepoLocation #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RepoLocation #

toConstr :: RepoLocation -> Constr #

dataTypeOf :: RepoLocation -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RepoLocation) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RepoLocation) #

gmapT :: (forall b. Data b => b -> b) -> RepoLocation -> RepoLocation #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RepoLocation -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RepoLocation -> r #

gmapQ :: (forall d. Data d => d -> u) -> RepoLocation -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> RepoLocation -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> RepoLocation -> m RepoLocation #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RepoLocation -> m RepoLocation #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RepoLocation -> m RepoLocation #

Show RepoLocation Source # 
Instance details

Defined in Update.Nix.FetchGit.Types

extractUrlString :: RepoLocation -> Text Source #

Get the url from either a nix expression for the url or a repo and owner expression.

extractFuncName :: NExprLoc -> Maybe Text Source #

Given an expression that is supposed to represent a function, extracts the name of the function. If we cannot figure out the function name, returns Nothing.

extractAttr :: Text -> [Binding a] -> Either Warning a Source #

Extract a named attribute from an attrset.

findAttr :: Text -> [Binding a] -> Either Warning (Maybe a) Source #

Find a named attribute in an attrset. This is appropriate for the case when a missing attribute is not an error.

matchAttr :: Text -> Binding a -> Maybe a Source #

Returns 'Just value' if this attribute's key matches the text, otherwise Nothing.

exprText :: NExprLoc -> Either Warning Text Source #

Get the string value of a particular expression, returns a Warning if the expression is not a string value.

TODO: Use evalExpr here

exprSpan :: NExprLoc -> SrcSpan Source #

Get the SrcSpan covering a particular expression.