packages feed

githash 0.1.6.0 → 0.1.6.1

raw patch · 3 files changed

+14/−7 lines, 3 filesdep +th-compatPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: th-compat

API changes (from Hackage documentation)

- GitHash: tGitInfo :: FilePath -> Q (TExp GitInfo)
+ GitHash: tGitInfo :: FilePath -> SpliceQ GitInfo
- GitHash: tGitInfoCwd :: Q (TExp GitInfo)
+ GitHash: tGitInfoCwd :: SpliceQ GitInfo
- GitHash: tGitInfoCwdTry :: Q (TExp (Either String GitInfo))
+ GitHash: tGitInfoCwdTry :: SpliceQ (Either String GitInfo)
- GitHash: tGitInfoTry :: FilePath -> Q (TExp (Either String GitInfo))
+ GitHash: tGitInfoTry :: FilePath -> SpliceQ (Either String GitInfo)

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # ChangeLog for githash +## 0.1.6.1++* [Support template-haskell 2.17](https://github.com/snoyberg/githash/pull/22)+ ## 0.1.6.0  * Always include patchlevel and hash in git-describe output
githash.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           githash-version:        0.1.6.0+version:        0.1.6.1 synopsis:       Compile git revision info into Haskell projects description:    Please see the README and documentation at <https://www.stackage.org/package/githash> category:       Development@@ -38,6 +38,7 @@     , filepath     , process     , template-haskell+    , th-compat   default-language: Haskell2010  test-suite githash-spec@@ -61,5 +62,6 @@     , process     , template-haskell     , temporary+    , th-compat     , unliftio   default-language: Haskell2010
src/GitHash.hs view
@@ -65,6 +65,7 @@ import Data.Typeable (Typeable) import Language.Haskell.TH import Language.Haskell.TH.Syntax+import Language.Haskell.TH.Syntax.Compat import System.Directory import System.Exit import System.FilePath@@ -256,8 +257,8 @@ -- directory. Compilation fails if no info is available. -- -- @since 0.1.0.0-tGitInfo :: FilePath -> Q (TExp GitInfo)-tGitInfo fp = unsafeTExpCoerce $ do+tGitInfo :: FilePath -> SpliceQ GitInfo+tGitInfo fp = unsafeSpliceCoerce $ do   gi <- runIO $     getGitRoot fp >>=     either throwIO return >>=@@ -270,8 +271,8 @@ -- directory. -- -- @since 0.1.2.0-tGitInfoTry :: FilePath -> Q (TExp (Either String GitInfo))-tGitInfoTry fp = unsafeTExpCoerce $ do+tGitInfoTry :: FilePath -> SpliceQ (Either String GitInfo)+tGitInfoTry fp = unsafeSpliceCoerce $ do   egi <- runIO $ do     eroot <- getGitRoot fp     case eroot of@@ -290,12 +291,12 @@ -- working directory. -- -- @since 0.1.0.0-tGitInfoCwd :: Q (TExp GitInfo)+tGitInfoCwd :: SpliceQ GitInfo tGitInfoCwd = tGitInfo "."  -- | Try to load up the 'GitInfo' value at compile time for the current -- working directory. -- -- @since 0.1.2.0-tGitInfoCwdTry :: Q (TExp (Either String GitInfo))+tGitInfoCwdTry :: SpliceQ (Either String GitInfo) tGitInfoCwdTry = tGitInfoTry "."