-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Host content provided by a Git repo
--   
--   Please see the README and generated docs at
--   <a>https://www.stackage.org/package/yesod-gitrepo</a>
@package yesod-gitrepo
@version 0.3.0

module Yesod.GitRepo

-- | 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
data GitRepo a

-- | Force a refresh of the content. Usually this is done automatically via
--   a POST request to the subsite route.
--   
--   Since 0.1.0
grRefresh :: GitRepo a -> IO ()

-- | Get the current value of the content.
--   
--   Since 0.1.0
grContent :: GitRepo a -> IO a

-- | Create a new <tt>GitRepo</tt> 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 <tt>grContent</tt> calls.
--   
--   Since 0.1.0
gitRepo :: Text -> Text -> (FilePath -> IO a) -> IO (GitRepo a)

-- | Like <a>gitRepo</a>, but intended to be used in a dev environment. It
--   just uses a hard-coded <tt>FilePath</tt> and reloads the contents on
--   each request.
--   
--   Since 0.1.1
gitRepoDev :: FilePath -> (FilePath -> IO a) -> IO (GitRepo a)

-- | The <a>type-safe URLs</a> associated with a site argument.
data family Route a :: Type
instance GHC.Read.Read (Yesod.Routes.Class.Route (Yesod.GitRepo.GitRepo a))
instance GHC.Classes.Eq (Yesod.Routes.Class.Route (Yesod.GitRepo.GitRepo a))
instance GHC.Show.Show (Yesod.Routes.Class.Route (Yesod.GitRepo.GitRepo a))
instance Yesod.Routes.Class.RenderRoute (Yesod.GitRepo.GitRepo a)
instance Yesod.Routes.Class.ParseRoute (Yesod.GitRepo.GitRepo a)
instance Yesod.Core.Class.Dispatch.YesodSubDispatch (Yesod.GitRepo.GitRepo a) site
