packages feed

ghc-typelits-natnormalise 0.1.1 → 0.1.2

raw patch · 3 files changed

+6/−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.1.2 *April 21st 2015*+* Don't simply expressions with negative exponents+ ## 0.1.1 *April 17th 2015* * Add workaround for https://ghc.haskell.org/trac/ghc/ticket/10301 
ghc-typelits-natnormalise.cabal view
@@ -1,5 +1,5 @@ name:                ghc-typelits-natnormalise-version:             0.1.1+version:             0.1.2 synopsis:            GHC typechecker plugin for types of kind GHC.TypeLits.Nat description:   A type checker plugin for GHC that can solve /equalities/ of types of kind
src/GHC/TypeLits/Normalise/SOP.hs view
@@ -143,7 +143,8 @@ reduceExp :: (Ord v, Ord c) => Symbol v c -> Symbol v c reduceExp (E _                 (P [(I 0)])) = I 1        -- x^0 ==> 1 reduceExp (E (S [P [I 0]])     _          ) = I 0        -- 0^x ==> 0-reduceExp (E (S [P [(I i)]])   (P [(I j)])) = I (i ^ j)  -- 2^3 ==> 8+reduceExp (E (S [P [(I i)]])   (P [(I j)]))+  | j >= 0                                  = I (i ^ j)  -- 2^3 ==> 8  -- (k ^ i) ^ j ==> k ^ (i * j) reduceExp (E (S [P [(E k i)]]) j) = case normaliseExp k (S [e]) of