packages feed

ghc-typelits-natnormalise 0.2 → 0.2.1

raw patch · 4 files changed

+12/−2 lines, 4 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.2.1 *May 6th 2015*+* Update `Eq` instance of `SOP`: Empty SOP is equal to 0+ ## 0.2 *April 22nd 2015* * Finds more unifications:   * `(2 + a) ~ 5  ==>  [a := 3]`
README.md view
@@ -1,6 +1,8 @@ # ghc-tynat-normalise  [![Build Status](https://secure.travis-ci.org/christiaanb/ghc-typelits-natnormalise.png?branch=master)](http://travis-ci.org/christiaanb/ghc-typelits-natnormalise)+[![Hackage](https://img.shields.io/hackage/v/ghc-typelits-natnormalise.svg)](https://hackage.haskell.org/package/ghc-typelits-natnormalise)+[![Hackage Dependencies](https://img.shields.io/hackage-deps/v/ghc-typelits-natnormalise.svg?style=flat)](http://packdeps.haskellers.com/feed?needle=exact%3Aghc-typelits-natnormalise)  A type checker plugin for GHC that can solve _equalities_  of types of kind `Nat`, where these types are either:
ghc-typelits-natnormalise.cabal view
@@ -1,5 +1,5 @@ name:                ghc-typelits-natnormalise-version:             0.2+version:             0.2.1 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
@@ -105,7 +105,12 @@   deriving (Eq,Ord)  newtype SOP v c = S { unS :: [Product v c] }-  deriving (Eq,Ord)+  deriving (Ord)++instance (Eq v, Eq c) => Eq (SOP v c) where+  (S []) == (S [P [I 0]]) = True+  (S [P [I 0]]) == (S []) = True+  (S ps1) == (S ps2)      = ps1 == ps2  instance (Outputable v, Outputable c) => Outputable (SOP v c) where   ppr = hcat . punctuate (text " + ") . map ppr . unS