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


-- | Compile git revision info into Haskell projects
--   
--   Some handy Template Haskell splices for including the current git hash
--   and branch in the code of your project. Useful for including in panic
--   messages, <tt>--version</tt> output, or diagnostic info for more
--   informative bug reports.
@package gitrev
@version 1.2.0


-- | Some handy Template Haskell splices for including the current git hash
--   and branch in the code of your project. Useful for including in panic
--   messages, <tt>--version</tt> output, or diagnostic info for more
--   informative bug reports.
--   
--   <pre>
--   {-# LANGUAGE TemplateHaskell #-}
--   import Development.GitRev
--   
--   panic :: String -&gt; a
--   panic msg = error panicMsg
--     where panicMsg =
--             concat [ "[panic ", $(gitBranch), "@", $(gitHash)
--                    , " (", $(gitCommitDate), ")"
--                    , " (", $(gitCommitCount), " commits in HEAD)"
--                    , dirty, "] ", msg ]
--           dirty | $(gitDirty) = " (uncommitted files present)"
--                 | otherwise   = ""
--   
--   main = panic "oh no!"
--   </pre>
--   
--   <pre>
--   % cabal exec runhaskell Example.hs
--   Example.hs: [panic master@2ae047ba5e4a6f0f3e705a43615363ac006099c1 (Mon Jan 11 11:50:59 2016 -0800) (14 commits in HEAD) (uncommitted files present)] oh no!
--   </pre>
module Development.GitRev

-- | Return the hash of the current git commit, or <tt>UNKNOWN</tt> if not
--   in a git repository
gitHash :: ExpQ

-- | Return the branch (or tag) name of the current git commit, or
--   <tt>UNKNOWN</tt> if not in a git repository. For detached heads, this
--   will just be <a>HEAD</a>
gitBranch :: ExpQ

-- | Return <tt>True</tt> if there are non-committed files present in the
--   repository
gitDirty :: ExpQ

-- | Return the number of commits in the current head
gitCommitCount :: ExpQ

-- | Return the commit date of the current head
gitCommitDate :: ExpQ
instance GHC.Classes.Eq Development.GitRev.IndexUsed
