packages feed

ghc-typelits-knownnat 0.7.9 → 0.7.10

raw patch · 3 files changed

+13/−7 lines, 3 filesnew-uploaderPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,8 @@ # Changelog for the [`ghc-typelits-knownnat`](http://hackage.haskell.org/package/ghc-typelits-knownnat) package +## 0.7.10 *November 14th 2023*+* Work around [GHC issue 23109](https://gitlab.haskell.org/ghc/ghc/-/issues/23109)+ ## 0.7.9 *October 10th 2023* * Support for GHC 9.8.1 
ghc-typelits-knownnat.cabal view
@@ -1,5 +1,5 @@ name:                ghc-typelits-knownnat-version:             0.7.9+version:             0.7.10 synopsis:            Derive KnownNat constraints from other KnownNat constraints description:   A type checker plugin for GHC that can derive \"complex\" @KnownNat@
src-ghc-9.4/GHC/TypeLits/KnownNat.hs view
@@ -173,12 +173,12 @@ -- | 'KnownNat2' instance for "GHC.TypeLits"' 'GHC.TypeLits.+' instance (KnownNat a, KnownNat b) => KnownNat2 $(nameToSymbol ''(+)) a b where   natSing2 = SNatKn (natVal (Proxy @a) + natVal (Proxy @b))-  {-# INLINE natSing2 #-}+  {-# NOINLINE natSing2 #-}  -- | 'KnownNat2' instance for "GHC.TypeLits"' 'GHC.TypeLits.*' instance (KnownNat a, KnownNat b) => KnownNat2 $(nameToSymbol ''(*)) a b where   natSing2 = SNatKn (natVal (Proxy @a) * natVal (Proxy @b))-  {-# INLINE natSing2 #-}+  {-# NOINLINE natSing2 #-}  -- | 'KnownNat2' instance for "GHC.TypeLits"' 'GHC.TypeLits.^' instance (KnownNat a, KnownNat b) => KnownNat2 $(nameToSymbol ''(^)) a b where@@ -188,18 +188,20 @@                        2 -> shiftLNatural 1 (fromIntegral y)                        _ -> x ^ y              in  SNatKn z-  {-# INLINE natSing2 #-}+  {-# NOINLINE natSing2 #-}  -- | 'KnownNat2' instance for "GHC.TypeLits"' 'GHC.TypeLits.-' instance (KnownNat a, KnownNat b, (b <= a) ~ (() :: Constraint)) => KnownNat2 $(nameToSymbol ''(-)) a b where   natSing2 = SNatKn (natVal (Proxy @a) - natVal (Proxy @b))-  {-# INLINE natSing2 #-}+  {-# NOINLINE natSing2 #-}  instance (KnownNat x, KnownNat y, (1 <= y) ~ (() :: Constraint)) => KnownNat2 $(nameToSymbol ''Div) x y where   natSing2 = SNatKn (quot (natVal (Proxy @x)) (natVal (Proxy @y)))+  {-# NOINLINE natSing2 #-}  instance (KnownNat x, KnownNat y, (1 <= y) ~ (() :: Constraint)) => KnownNat2 $(nameToSymbol ''Mod) x y where   natSing2 = SNatKn (rem (natVal (Proxy @x)) (natVal (Proxy @y)))+  {-# NOINLINE natSing2 #-}  -- | Singleton version of 'Bool' data SBool (b :: Bool) where@@ -256,11 +258,11 @@  instance (KnownNat a, KnownNat b) => KnownBoolNat2 $(nameToSymbol ''(<=?)) a b where   boolNatSing2 = SBoolKb (natVal (Proxy @a) <= natVal (Proxy @b))-  {-# INLINE boolNatSing2 #-}+  {-# NOINLINE boolNatSing2 #-}  instance (KnownNat a, KnownNat b) => KnownBoolNat2 $(nameToSymbol ''OrdCond) a b where   boolNatSing2 = SBoolKb (natVal (Proxy @a) <= natVal (Proxy @b))-  {-# INLINE boolNatSing2 #-}+  {-# NOINLINE boolNatSing2 #-}  -- | Class for ternary functions with a Natural result. --@@ -272,3 +274,4 @@  instance (KnownBool a, KnownNat b, KnownNat c) => KnownNat2Bool $(nameToSymbol ''If) a b c where   natBoolSing3 = SNatKn (if boolVal (Proxy @a) then natVal (Proxy @b) else natVal (Proxy @c))+  {-# NOINLINE natBoolSing3 #-}