2 Commit-ok 03b60419db ... 9c097154d8

Szerző SHA1 Üzenet Dátum
  sheaf 9c097154d8 v 2.1.3.0 10 hónapja
  Koji Miyazato 6f61482d71 Upgrade finite-typelits to 0.2.0.0 10 hónapja
3 módosított fájl, 13 hozzáadás és 4 törlés
  1. 4 0
      CHANGELOG.md
  2. 2 2
      finitary.cabal
  3. 7 2
      src/Data/Finitary.hs

+ 4 - 0
CHANGELOG.md

@@ -1,5 +1,9 @@
 # Revision history for finitary
 
+## 2.1.3.0 -- 2024-05-09
+
+* Add support for `finite-typelits >= 2.0.0`.
+
 ## 2.1.2.0 -- 2024-05-06
 
 * Allow `typelits-witnesses-0.4.0.1`, and bump upper bounds of

+ 2 - 2
finitary.cabal

@@ -1,6 +1,6 @@
 cabal-version:      2.2
 name:               finitary
-version:            2.1.2.0
+version:            2.1.3.0
 synopsis:           A better, more type-safe Enum.
 description:
   Provides a type class witnessing that a type has
@@ -45,7 +45,7 @@ library
     , base
         >= 4.12     && < 5
     , finite-typelits
-       ^>= 0.1.4.2
+        >= 0.1.4.2 && < 0.3
     , ghc-typelits-knownnat
        ^>= 0.7.2
     , ghc-typelits-natnormalise

+ 7 - 2
src/Data/Finitary.hs

@@ -14,6 +14,7 @@
 {-# LANGUAGE TypeOperators #-}
 {-# LANGUAGE UndecidableInstances #-}
 {-# LANGUAGE NoStarIsType #-}
+{-# LANGUAGE PatternSynonyms #-}
 {-# OPTIONS_GHC -fplugin GHC.TypeLits.KnownNat.Solver #-}
 {-# OPTIONS_GHC -fplugin GHC.TypeLits.Normalise #-}
 
@@ -131,8 +132,12 @@ import Data.Finite
   , shiftN
   , weakenN
   )
-import Data.Finite.Internal
-  ( Finite(..) )
+#if MIN_VERSION_finite_typelits(0,2,0)
+import Data.Finite.Internal ( type Finite )
+import Data.Finite.Internal.Integral ( pattern Finite )
+#else
+import Data.Finite.Internal ( Finite(..) )
+#endif
 
 #ifdef BITVEC
 -- bitvec