packages feed

data-diverse 0.9.0.0 → 0.9.0.1

raw patch · 4 files changed

+19/−4 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

README.md view
@@ -45,3 +45,6 @@   - Added postifx' with SnocUnique and append' with AppendUnique.   - Added Semigroup & Monoid instances for `Many '[]` and `Which '[]`   - Fixed GHC 8.2 compile error with importing GHC.Prim (Any)++* 0.9.0.1+  - Fixed GHC 8.2.1 test failure due to changed TypeRep show instance.
data-diverse.cabal view
@@ -1,5 +1,5 @@ name:                data-diverse-version:             0.9.0.0+version:             0.9.0.1 synopsis:            Extensible records and polymorphic variants. description:         "Data.Diverse.Many" is an extensible record for any size encoded efficiently as (Seq Any).                      "Data.Diverse.Which" is a polymorphic variant of possibilities encoded as (Int, Any).@@ -20,7 +20,7 @@ build-type:          Simple extra-source-files:  README.md cabal-version:       >=1.10-tested-with:         GHC == 8.0.2+tested-with:         GHC == 8.0.2, GHC == 8.2.1  library   hs-source-dirs:      src
test/Data/Diverse/ManySpec.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-}@@ -30,7 +31,12 @@                 z = cast x :: Maybe (Many '[Int, Bool])             y `shouldBe` Nothing             z `shouldBe` Just x-            (show . typeRep . (pure @Proxy) $ x) `shouldBe` "Many (': * Int (': * Bool '[]))"+#if __GLASGOW_HASKELL__ >= 802+            let expected = "Many (': * Int (': * Bool ('[] *)))"+#else+            let expected = "Many (': * Int (': * Bool '[]))"+#endif+            (show . typeRep . (pure @Proxy) $ x) `shouldBe` expected          it "is a Read and Show" $ do             let s = "5 ./ False ./ 'X' ./ Just 'O' ./ nil"
test/Data/Diverse/WhichSpec.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-}@@ -233,7 +234,12 @@         it "can be switched with a single 'CaseTypeable' handler" $ do             let y = pick (5 :: Int) :: Which '[Int, Bool]             switch y (CaseTypeable (show . typeRep . (pure @Proxy))) `shouldBe` "Int"-            (show . typeRep . (pure @Proxy) $ y) `shouldBe` "Which (': * Int (': * Bool '[]))"+#if __GLASGOW_HASKELL__ >= 802+            let expected = "Which (': * Int (': * Bool ('[] *)))"+#else+            let expected = "Which (': * Int (': * Bool '[]))"+#endif+            (show . typeRep . (pure @Proxy) $ y) `shouldBe` expected          it "is a compile error to 'trial', 'diversify', 'reinterpret 'impossible'" $ do             -- let a = diversify @[Int, Bool] impossible