| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Git.Embed
Description
Use Template Haskell to embed Git revision, branch, and tag information.
Also adds dependent files so that changes to Git refs cause a rebuild.
Example:
{-# LANGUAGE TemplateHaskell #-}
import Git.Embed
main :: IO ()
main = putStrLn ("Git revision: " ++ gitRev ++ ", branch: " ++ gitBranch)
gitRev :: String
gitRev = $(embedGitShortRevision)
gitBranch :: String
gitBranch = $(embedGitBranch)- embedGitRevision :: Q Exp
- embedGitShortRevision :: Q Exp
- embedGitBranch :: Q Exp
- embedGitDescribe :: [String] -> Q Exp
- embedGit :: [String] -> Q Exp
Documentation
embedGitRevision :: Q Exp Source
Embed the current Git long hexadecimal revision ID.
embedGitShortRevision :: Q Exp Source
Embed the current Git short hexadecimal revision ID (first 7 digits).
embedGitBranch :: Q Exp Source
Embed the current Git branch name.