packages feed

ghc-typelits-extra 0.3.1 → 0.3.2

raw patch · 3 files changed

+17/−3 lines, 3 filesPVP 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-extra`](http://hackage.haskell.org/package/ghc-typelits-extra) package +# 0.3.2 *January 18th 2020*+* Fix https://github.com/clash-lang/clash-compiler/issues/1019+ # 0.3.1 *August 26th 2019* * Reduce `a <=? Max a b` to `True` * Reduce `n ~ (Max a b) => a <=? n` to `True`
ghc-typelits-extra.cabal view
@@ -1,5 +1,5 @@ name:                ghc-typelits-extra-version:             0.3.1+version:             0.3.2 synopsis:            Additional type-level operations on GHC.TypeLits.Nat description:   Additional type-level operations on @GHC.TypeLits.Nat@:
src/GHC/TypeLits/Extra.hs view
@@ -83,6 +83,9 @@ import GHC.Base               (Int#,isTrue#,(==#),(+#)) import GHC.Integer.Logarithms (integerLogBase#) #if MIN_VERSION_ghc(8,2,0)+import GHC.Magic              (noinline)+#endif+#if MIN_VERSION_ghc(8,2,0) import qualified GHC.TypeNats as N import GHC.Natural import GHC.Prim               (int2Word#)@@ -217,7 +220,11 @@   -- Additional equations are provided by the custom solver  instance (KnownNat x, KnownNat y) => KnownNat2 $(nameToSymbol ''GCD) x y where-  natSing2 = SNatKn (gcd (N.natVal (Proxy @x)) (N.natVal (Proxy @y)))+  natSing2 = SNatKn (+#if MIN_VERSION_ghc(8,2,0)+    noinline+#endif+      gcd (N.natVal (Proxy @x)) (N.natVal (Proxy @y)))  -- | Type-level least common multiple (LCM). --@@ -232,4 +239,8 @@   -- Additional equations are provided by the custom solver  instance (KnownNat x, KnownNat y) => KnownNat2 $(nameToSymbol ''LCM) x y where-  natSing2 = SNatKn (lcm (N.natVal (Proxy @x)) (N.natVal (Proxy @y)))+  natSing2 = SNatKn (+#if MIN_VERSION_ghc(8,2,0)+    noinline+#endif+      lcm (N.natVal (Proxy @x)) (N.natVal (Proxy @y)))