| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Yesod.GitRepo
Documentation
A combination of Yesod subsite to be used for creating a refresh route, as well as action to extract the current value of the content and force a refresh.
Since 0.1.0
Instances
| Eq (Route (GitRepo a)) # | |
| Read (Route (GitRepo a)) # | |
| Show (Route (GitRepo a)) # | |
| RenderRoute (GitRepo a) # | |
| ParseRoute (GitRepo a) # | |
Defined in Yesod.GitRepo | |
| YesodSubDispatch (GitRepo a) site # | |
Defined in Yesod.GitRepo Methods yesodSubDispatch :: YesodSubRunnerEnv (GitRepo a) site -> Application # | |
| data Route (GitRepo a) # | |
Defined in Yesod.GitRepo | |
grRefresh :: GitRepo a -> IO () #
Force a refresh of the content. Usually this is done automatically via a POST request to the subsite route.
Since 0.1.0
Arguments
| :: Text | URL |
| -> Text | branch name |
| -> (FilePath -> IO a) | what to do on clone/refresh |
| -> IO (GitRepo a) |
Create a new GitRepo value that can be used as a refresh subsite, as
well as to extract the current value of the content.
Note that if the initial clone or user action fails, this function will
throw an exception. For subsequent refreshes, the exception will be stored
as an impure exception for future grContent calls.
Since 0.1.0
gitRepoDev :: FilePath -> (FilePath -> IO a) -> IO (GitRepo a) #
Like gitRepo, but intended to be used in a dev environment. It just uses
a hard-coded FilePath and reloads the contents on each request.
Since 0.1.1
The type-safe URLs associated with a site argument.