Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data RepoLocation
- ourParseNixText :: Text -> Either Warning NExprLoc
- ourParseNixFile :: FilePath -> M NExprLoc
- extractUrlString :: RepoLocation -> Text
- prettyRepoLocation :: RepoLocation -> Text
- quoteString :: Text -> Text
- extractFuncName :: NExprLoc -> Maybe Text
- pathText :: NAttrPath r -> Maybe Text
- exprText :: NExprLoc -> Either Warning Text
- exprBool :: NExprLoc -> Either Warning Bool
- exprSpan :: NExprLoc -> SrcSpan
- containsPosition :: NExprLoc -> (Int, Int) -> Bool
- parseISO8601DateToDay :: Text -> Either Warning Day
- formatWarning :: Warning -> Text
- fromEither :: Either Warning a -> M a
- note :: Warning -> Maybe a -> M a
- refute1 :: Warning -> M a
- logVerbose :: Text -> M ()
- logNormal :: Text -> M ()
Documentation
data RepoLocation Source #
A repo is either specified by URL or by Github owner/repo.
Instances
Show RepoLocation Source # | |
Defined in Update.Nix.FetchGit.Types showsPrec :: Int -> RepoLocation -> ShowS # show :: RepoLocation -> String # showList :: [RepoLocation] -> ShowS # |
extractUrlString :: RepoLocation -> Text Source #
Get the url from either a nix expression for the url or a repo and owner expression.
quoteString :: Text -> Text Source #
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.
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
formatWarning :: Warning -> Text Source #
logVerbose :: Text -> M () Source #