packages feed

th-compat 0.1.6 → 0.1.7

raw patch · 3 files changed

+36/−13 lines, 3 filesdep ~template-haskell

Dependency ranges changed: template-haskell

Files

CHANGELOG.md view
@@ -1,3 +1,6 @@+### 0.1.7 [2026.01.03]+* Allow building with GHC 9.14.+ ### 0.1.6 [2024.12.05] * Drop support for pre-8.0 versions of GHC. 
src/Language/Haskell/TH/Syntax/Compat.hs view
@@ -12,6 +12,10 @@ {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} +#if __GLASGOW_HASKELL__ >= 810+{-# LANGUAGE StandaloneKindSignatures #-}+#endif+ -- | This module exists to make it possible to define code that works across -- a wide range of @template-haskell@ versions with as little CPP as possible. -- To that end, this module currently backports the following@@ -78,6 +82,7 @@  import qualified Control.Monad.Fail as Fail import Control.Monad.IO.Class (MonadIO(..))+import Data.Kind (Type) import Language.Haskell.TH (Exp) import qualified Language.Haskell.TH.Lib as Lib () import Language.Haskell.TH.Syntax (Q, runQ, Quasi(..))@@ -373,7 +378,7 @@ -- other method of 'Quasi' to be an error, since they cannot be implemented -- using 'Quote' alone. Similarly, its 'MonadFail' and 'MonadIO' instances -- define 'fail' and 'liftIO', respectively, to be errors.-newtype QuoteToQuasi (m :: * -> *) a = QTQ { unQTQ :: m a }+newtype QuoteToQuasi (m :: Type -> Type) a = QTQ { unQTQ :: m a }   deriving (Functor, Applicative, Monad)  qtqError :: String -> a@@ -551,6 +556,9 @@  -- | Levity-polymorphic since /template-haskell-2.16.0.0/. #if !(MIN_VERSION_template_haskell(2,17,0))+# if __GLASGOW_HASKELL__ >= 810+type Code :: forall r. (Type -> Type) -> TYPE r -> Type+# endif type role Code representational nominal newtype Code m # if MIN_VERSION_template_haskell(2,16,0)@@ -562,10 +570,13 @@   { examineCode :: m (Syntax.TExp a) -- ^ Underlying monadic value   } +# if __GLASGOW_HASKELL__ >= 810+type CodeQ :: TYPE r -> Type+# endif type CodeQ = Code Q-#if MIN_VERSION_template_haskell(2,16,0)-                    :: (TYPE r -> *)-#endif+# if MIN_VERSION_template_haskell(2,16,0)+                    :: (TYPE r -> Type)+# endif  -- | Unsafely convert an untyped code representation into a typed code -- representation.@@ -719,9 +730,14 @@ -- -- Levity-polymorphic since /template-haskell-2.16.0.0/. #if MIN_VERSION_template_haskell(2,22,0)-type Splice  = Code :: ((* -> *) -> forall r. TYPE r -> *)+type Splice :: (Type -> Type) -> forall r. TYPE r -> Type+#elif __GLASGOW_HASKELL__ >= 810+type Splice :: forall r. (Type -> Type) -> TYPE r -> Type+#endif+#if MIN_VERSION_template_haskell(2,22,0)+type Splice  = Code :: ((Type -> Type) -> forall r. TYPE r -> Type) #elif MIN_VERSION_template_haskell(2,17,0)-type Splice  = Code :: (forall r. (* -> *) -> TYPE r -> *)+type Splice  = Code :: (forall r. (Type -> Type) -> TYPE r -> Type) #elif MIN_VERSION_template_haskell(2,16,0) type Splice m (a :: TYPE r) = m (Syntax.TExp a) #else@@ -741,8 +757,11 @@ -- differ between @template-haskell@ versions as well. -- -- Levity-polymorphic since /template-haskell-2.16.0.0/.+#if __GLASGOW_HASKELL__ >= 810+type SpliceQ :: TYPE r -> Type+#endif #if MIN_VERSION_template_haskell(2,17,0)-type SpliceQ = Splice Q :: (TYPE r -> *)+type SpliceQ = Splice Q #elif MIN_VERSION_template_haskell(2,16,0) type SpliceQ (a :: TYPE r) = Splice Q a #else
th-compat.cabal view
@@ -1,6 +1,6 @@ cabal-version:       >=1.10 name:                th-compat-version:             0.1.6+version:             0.1.7 synopsis:            Backward- (and forward-)compatible Quote and Code types description:         This package defines a "Language.Haskell.TH.Syntax.Compat"                      module, which backports the @Quote@ and @Code@ types to@@ -29,10 +29,11 @@                    , GHC == 9.0.2                    , GHC == 9.2.8                    , GHC == 9.4.8-                   , GHC == 9.6.6+                   , GHC == 9.6.7                    , GHC == 9.8.4-                   , GHC == 9.10.1-                   , GHC == 9.12.1+                   , GHC == 9.10.3+                   , GHC == 9.12.2+                   , GHC == 9.14.1 extra-source-files:  CHANGELOG.md, README.md  source-repository head@@ -42,7 +43,7 @@ library   exposed-modules:     Language.Haskell.TH.Syntax.Compat   build-depends:       base             >= 4.9  && < 5-                     , template-haskell >= 2.11 && < 2.24+                     , template-haskell >= 2.11 && < 2.25   if !impl(ghc >= 9.4)     build-depends:     filepath         >= 1.2.0.0 && < 1.6                      , directory        >= 1.1.0.0 && < 1.4@@ -60,7 +61,7 @@   build-depends:       base             >= 4.9 && < 5                      , hspec            >= 2   && < 3                      , mtl              >= 2.1 && < 2.4-                     , template-haskell >= 2.5 && < 2.24+                     , template-haskell >= 2.5 && < 2.25                      , th-compat   build-tool-depends:  hspec-discover:hspec-discover >= 2   hs-source-dirs:      tests