packages feed

eliminators 0.9.1 → 0.9.2

raw patch · 3 files changed

+14/−7 lines, 3 filesdep ~th-abstraction

Dependency ranges changed: th-abstraction

Files

CHANGELOG.md view
@@ -1,3 +1,6 @@+### 0.9.2 [2023.02.27]+* Support building with `th-abstraction-0.5.*`.+ ### 0.9.1 [2022.08.23] * Require GHC 9.4. * Add `Data.Eliminator.TypeLits`, which re-exports
eliminators.cabal view
@@ -1,5 +1,5 @@ name:                eliminators-version:             0.9.1+version:             0.9.2 synopsis:            Dependently typed elimination functions using singletons description:         This library provides eliminators for inductive data types,                      leveraging the power of the @singletons@ library to allow@@ -36,7 +36,7 @@                      , singleton-nats   >= 0.4.2 && < 0.5                      , template-haskell >= 2.19  && < 2.20                      , text             >= 2.0.1 && < 2.1-                     , th-abstraction   >= 0.4   && < 0.5+                     , th-abstraction   >= 0.4   && < 0.6                      , th-desugar       >= 1.14  && < 1.15   hs-source-dirs:      src   default-language:    GHC2021
src/Data/Eliminator/TH.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TemplateHaskellQuotes #-} {-# LANGUAGE Unsafe #-}@@ -34,7 +35,7 @@ import           Data.Singletons.TH.Options  import           Language.Haskell.TH-import           Language.Haskell.TH.Datatype+import           Language.Haskell.TH.Datatype as Datatype import           Language.Haskell.TH.Datatype.TyVarBndr import           Language.Haskell.TH.Desugar hiding (NewOrData(..)) @@ -281,10 +282,13 @@   let noDataFamilies =         fail "Eliminators for data family instances are currently not supported"   case variant of-    DataInstance    -> noDataFamilies-    NewtypeInstance -> noDataFamilies-    Datatype        -> pure ()-    Newtype         -> pure ()+    DataInstance      -> noDataFamilies+    NewtypeInstance   -> noDataFamilies+    Datatype          -> pure ()+    Newtype           -> pure ()+#if MIN_VERSION_th_abstraction(0,5,0)+    Datatype.TypeData -> pure ()+#endif   predVar <- newName "p"   singVar <- newName "s"   let elimName = mkName funName