ghc-typelits-natnormalise 0.7.3 → 0.7.4
raw patch · 3 files changed
+11/−2 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-natnormalise`](http://hackage.haskell.org/package/ghc-typelits-natnormalise) package +## 0.7.4 *February 12th 2021*+* Fixes [#50](https://github.com/clash-lang/ghc-typelits-natnormalise/issues/50) `x ^ C ~ y` erroneously deemed hard insoluable, a contradiction, when `C` is some type family other than +,-,*,^+ ## 0.7.3 *January 1st 2021* * Build on GHC 9.0.1-rc1
ghc-typelits-natnormalise.cabal view
@@ -1,5 +1,5 @@ name: ghc-typelits-natnormalise-version: 0.7.3+version: 0.7.4 synopsis: GHC typechecker plugin for types of kind GHC.TypeLits.Nat description: A type checker plugin for GHC that can solve /equalities/ and /inequalities/
src/GHC/TypeLits/Normalise/Unify.hs view
@@ -593,7 +593,13 @@ eqFV = (==) `on` fvSOP containsConstants :: CoreSOP -> Bool-containsConstants = any (any (\c -> case c of {(C _) -> True; _ -> False}) . unP) . unS+containsConstants =+ any (any symbolContainsConstant . unP) . unS+ where+ symbolContainsConstant c = case c of+ C {} -> True+ E s p -> containsConstants s || containsConstants (S [p])+ _ -> False safeDiv :: Integer -> Integer -> Maybe Integer safeDiv i j