packages feed

data-diverse 4.5.0.0 → 4.6.0.0

raw patch · 5 files changed

+12/−8 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Data.Diverse.Many.Internal: instance (Data.Semigroup.Semigroup x, Data.Semigroup.Semigroup (Data.Diverse.Many.Internal.Many_ xs)) => Data.Semigroup.Semigroup (Data.Diverse.Many.Internal.Many_ (x : xs))
- Data.Diverse.Many.Internal: instance Data.Semigroup.Semigroup (Data.Diverse.Many.Internal.Many_ '[])
- Data.Diverse.Many.Internal: instance Data.Semigroup.Semigroup (Data.Diverse.Many.Internal.Many_ xs) => Data.Semigroup.Semigroup (Data.Diverse.Many.Internal.Many xs)
- Data.Diverse.Which: definitely :: f (Which '[]) -> f (Which '[])
- Data.Diverse.Which.Internal: definitely :: f (Which '[]) -> f (Which '[])
- Data.Diverse.Which.Internal: instance Data.Semigroup.Semigroup (Data.Diverse.Which.Internal.Which '[])
+ Data.Diverse.Many.Internal: instance (GHC.Base.Semigroup x, GHC.Base.Semigroup (Data.Diverse.Many.Internal.Many_ xs)) => GHC.Base.Semigroup (Data.Diverse.Many.Internal.Many_ (x : xs))
+ Data.Diverse.Many.Internal: instance GHC.Base.Semigroup (Data.Diverse.Many.Internal.Many_ '[])
+ Data.Diverse.Many.Internal: instance GHC.Base.Semigroup (Data.Diverse.Many.Internal.Many_ xs) => GHC.Base.Semigroup (Data.Diverse.Many.Internal.Many xs)
+ Data.Diverse.Which: totally :: f (Which '[]) -> f (Which '[])
+ Data.Diverse.Which.Internal: instance GHC.Base.Semigroup (Data.Diverse.Which.Internal.Which '[])
+ Data.Diverse.Which.Internal: totally :: f (Which '[]) -> f (Which '[])

Files

README.md view
@@ -14,6 +14,9 @@  # Changelog +* 4.6.0.0+  - Renamed `definitely` to `totally`.+ * 4.5.0.0   - Replaced usages of `KnownNat` with a new `NatToInt` class to avoid inefficient Integer https://github.com/louispan/data-diverse/issues/8. 
data-diverse.cabal view
@@ -1,5 +1,5 @@ name:                data-diverse-version:             4.5.0.0+version:             4.6.0.0 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).
src/Data/Diverse/Which.hs view
@@ -7,7 +7,7 @@       -- ** Construction     , impossible     , impossible'-    , definitely+    , totally     , pick     , pick0     , pickOnly
src/Data/Diverse/Which/Internal.hs view
@@ -28,7 +28,7 @@       -- ** Construction     , impossible     , impossible'-    , definitely+    , totally     , pick     , pick0     , pickOnly@@ -188,10 +188,11 @@ impossible' :: Which '[Void] -> a impossible' a = case a of {} --- | This function is useful to type restrict something (usually a continuation monad)--- that returns a polymorphic type to return (Which '[])-definitely :: f (Which '[]) -> f (Which '[])-definitely = id+-- | This function is useful to type restrict something that returns a polymorphic type+-- to return (Which '[]). Eg. use thishat to prove at compile time that a+-- finished continuation monad has no more unhandled holes.+totally :: f (Which '[]) -> f (Which '[])+totally = id  -- | Lift a value into a 'Which' of possibly other types @xs@. -- @xs@ can be inferred or specified with TypeApplications.
test/Data/Diverse/ManySpec.hs view
@@ -327,7 +327,7 @@             afoldr (:) [] (collectN x (casesN y)) `shouldBe` ret             afoldr (:) [] (forManyN (casesN y) x) `shouldBe` ret -        it "every piece can be mapped into a different type in a Functor-like fashion with using 'afmap'" $ do+        it "every hasLens can be mapped into a different type in a Functor-like fashion with using 'afmap'" $ do             let x = (5 :: Int) ./ (6 :: Int8) ./ (7 :: Int16) ./ (8 :: Int32) ./ nil                 y = (15 :: Int) ./ (16 :: Int8) ./ (17 :: Int16) ./ (18 :: Int32) ./ nil                 z = ("5" :: String) ./ ("6" :: String) ./ ("7" :: String) ./ ("8" :: String) ./ nil