Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class HasWorkingDirectory env where
- workingDirectoryL :: Lens' env FilePath
- class HasSystem env where
- getCurrentDirectory :: RIO env FilePath
- setCurrentDirectory :: FilePath -> RIO env ()
- doesFileExist :: FilePath -> RIO env Bool
- doesDirectoryExist :: FilePath -> RIO env Bool
- isFileExecutable :: FilePath -> RIO env Bool
- listDirectory :: FilePath -> RIO env [FilePath]
- readFile :: FilePath -> RIO env Text
- readFileBS :: FilePath -> RIO env ByteString
- writeFile :: FilePath -> Text -> RIO env ()
- class HasExit env where
- exitSuccess :: RIO env a
- exitWithInfo :: (HasLogFunc env, HasExit env) => Utf8Builder -> RIO env a
- class HasProcess env where
- callProcess :: String -> [String] -> RIO env ()
- callProcessExitCode :: String -> [String] -> RIO env ExitCode
- readProcess :: String -> [String] -> String -> RIO env String
- class HasDownloadFile env where
- downloadFile :: Text -> FilePath -> RIO env ()
- class HasGitHub env where
- runGitHub :: ParseResponse m a => GenRequest m k a -> RIO env a
- runGitHubFirst :: (HasGitHub env, ParseResponse m (Vector a)) => (FetchCount -> GenRequest m k (Vector a)) -> RIO env (Maybe a)
- runGitHub_ :: (HasGitHub env, ParseResponse m a) => GenRequest m k a -> RIO env ()
- getPullRequestLabelNames :: HasGitHub env => PullRequest -> RIO env (Vector (Name IssueLabel))
Documentation
class HasWorkingDirectory env where Source #
workingDirectoryL :: Lens' env FilePath Source #
Instances
HasWorkingDirectory App Source # | |
Defined in Restyler.App | |
HasWorkingDirectory StartupApp Source # | |
Defined in Restyler.App |
class HasSystem env where Source #
getCurrentDirectory :: RIO env FilePath Source #
setCurrentDirectory :: FilePath -> RIO env () Source #
doesFileExist :: FilePath -> RIO env Bool Source #
doesDirectoryExist :: FilePath -> RIO env Bool Source #
isFileExecutable :: FilePath -> RIO env Bool Source #
listDirectory :: FilePath -> RIO env [FilePath] Source #
readFile :: FilePath -> RIO env Text Source #
readFileBS :: FilePath -> RIO env ByteString Source #
Instances
HasSystem App Source # | |
Defined in Restyler.App getCurrentDirectory :: RIO App FilePath Source # setCurrentDirectory :: FilePath -> RIO App () Source # doesFileExist :: FilePath -> RIO App Bool Source # doesDirectoryExist :: FilePath -> RIO App Bool Source # isFileExecutable :: FilePath -> RIO App Bool Source # listDirectory :: FilePath -> RIO App [FilePath] Source # readFile :: FilePath -> RIO App Text Source # readFileBS :: FilePath -> RIO App ByteString Source # | |
HasSystem StartupApp Source # | |
Defined in Restyler.App getCurrentDirectory :: RIO StartupApp FilePath Source # setCurrentDirectory :: FilePath -> RIO StartupApp () Source # doesFileExist :: FilePath -> RIO StartupApp Bool Source # doesDirectoryExist :: FilePath -> RIO StartupApp Bool Source # isFileExecutable :: FilePath -> RIO StartupApp Bool Source # listDirectory :: FilePath -> RIO StartupApp [FilePath] Source # readFile :: FilePath -> RIO StartupApp Text Source # readFileBS :: FilePath -> RIO StartupApp ByteString Source # |
class HasExit env where Source #
exitSuccess :: RIO env a Source #
Instances
HasExit App Source # | |
Defined in Restyler.App exitSuccess :: RIO App a Source # | |
HasExit StartupApp Source # | |
Defined in Restyler.App exitSuccess :: RIO StartupApp a Source # |
exitWithInfo :: (HasLogFunc env, HasExit env) => Utf8Builder -> RIO env a Source #
class HasProcess env where Source #
callProcess :: String -> [String] -> RIO env () Source #
callProcessExitCode :: String -> [String] -> RIO env ExitCode Source #
readProcess :: String -> [String] -> String -> RIO env String Source #
Instances
HasProcess App Source # | |
HasProcess StartupApp Source # | |
Defined in Restyler.App callProcess :: String -> [String] -> RIO StartupApp () Source # callProcessExitCode :: String -> [String] -> RIO StartupApp ExitCode Source # readProcess :: String -> [String] -> String -> RIO StartupApp String Source # |
class HasDownloadFile env where Source #
Instances
HasDownloadFile App Source # | |
Defined in Restyler.App | |
HasDownloadFile StartupApp Source # | |
Defined in Restyler.App downloadFile :: Text -> FilePath -> RIO StartupApp () Source # |
GitHub
class HasGitHub env where Source #
runGitHub :: ParseResponse m a => GenRequest m k a -> RIO env a Source #
Instances
HasGitHub App Source # | |
Defined in Restyler.App runGitHub :: forall (m :: MediaType Type) a (k :: RW). ParseResponse m a => GenRequest m k a -> RIO App a Source # | |
HasGitHub StartupApp Source # | |
Defined in Restyler.App runGitHub :: forall (m :: MediaType Type) a (k :: RW). ParseResponse m a => GenRequest m k a -> RIO StartupApp a Source # |
runGitHubFirst :: (HasGitHub env, ParseResponse m (Vector a)) => (FetchCount -> GenRequest m k (Vector a)) -> RIO env (Maybe a) Source #
Fetch the first page using
, return the first itemrunGitHub
runGitHub_ :: (HasGitHub env, ParseResponse m a) => GenRequest m k a -> RIO env () Source #
Higher-level actions
getPullRequestLabelNames :: HasGitHub env => PullRequest -> RIO env (Vector (Name IssueLabel)) Source #