Hello community,

here is the log from the commit of package ghc-constraints for 
openSUSE:Leap:15.2 checked in at 2020-02-19 18:38:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/ghc-constraints (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.ghc-constraints.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-constraints"

Wed Feb 19 18:38:22 2020 rev:11 rq:771265 version:0.11.2

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/ghc-constraints/ghc-constraints.changes        
2020-01-15 15:01:56.265794847 +0100
+++ 
/work/SRC/openSUSE:Leap:15.2/.ghc-constraints.new.26092/ghc-constraints.changes 
    2020-02-19 18:38:38.841972748 +0100
@@ -1,0 +2,32 @@
+Fri Nov  8 16:13:29 UTC 2019 - Peter Simons <[email protected]>
+
+- Drop obsolete group attributes.
+
+-------------------------------------------------------------------
+Sat Sep  7 02:01:41 UTC 2019 - [email protected]
+
+- Update constraints to version 0.11.2.
+  0.11.2 [2019.09.06]
+  -------------------
+  * Depend on the `type-equality` compatibility library so that `(:~~:)` may be
+    used when compiling this library with GHC 8.0. This avoids having to 
redefine
+    `(:~~:)` directly in the internals of `constraints` itself.
+
+-------------------------------------------------------------------
+Wed Aug 28 02:02:27 UTC 2019 - [email protected]
+
+- Update constraints to version 0.11.1.
+  0.11.1 [2019.08.27]
+  -------------------
+  * Make `Data.Constraint.Deferrable.UnsatisfiedConstraint` a newtype.
+
+-------------------------------------------------------------------
+Sat May 11 02:00:35 UTC 2019 - [email protected]
+
+- Update constraints to version 0.11.
+  Upstream has edited the change log file since the last release in
+  a non-trivial way, i.e. they did more than just add a new entry
+  at the top. You can review the file at:
+  http://hackage.haskell.org/package/constraints-0.11/src/CHANGELOG.markdown
+
+-------------------------------------------------------------------

Old:
----
  constraints-0.10.1.tar.gz

New:
----
  constraints-0.11.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-constraints.spec ++++++
--- /var/tmp/diff_new_pack.87VIiV/_old  2020-02-19 18:38:39.357973828 +0100
+++ /var/tmp/diff_new_pack.87VIiV/_new  2020-02-19 18:38:39.361973836 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-constraints
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,11 +19,10 @@
 %global pkg_name constraints
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.10.1
+Version:        0.11.2
 Release:        0
 Summary:        Constraint manipulation
 License:        BSD-2-Clause
-Group:          Development/Libraries/Haskell
 URL:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
@@ -35,6 +34,7 @@
 BuildRequires:  ghc-semigroups-devel
 BuildRequires:  ghc-transformers-compat-devel
 BuildRequires:  ghc-transformers-devel
+BuildRequires:  ghc-type-equality-devel
 %if %{with tests}
 BuildRequires:  ghc-hspec-devel
 %endif
@@ -47,7 +47,6 @@
 
 %package devel
 Summary:        Haskell %{pkg_name} library development files
-Group:          Development/Libraries/Haskell
 Requires:       %{name} = %{version}-%{release}
 Requires:       ghc-compiler = %{ghc_version}
 Requires(post): ghc-compiler = %{ghc_version}

++++++ constraints-0.10.1.tar.gz -> constraints-0.11.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/constraints-0.10.1/CHANGELOG.markdown 
new/constraints-0.11.2/CHANGELOG.markdown
--- old/constraints-0.10.1/CHANGELOG.markdown   2018-07-03 02:15:10.000000000 
+0200
+++ new/constraints-0.11.2/CHANGELOG.markdown   2001-09-09 03:46:40.000000000 
+0200
@@ -1,3 +1,28 @@
+0.11.2 [2019.09.06]
+-------------------
+* Depend on the `type-equality` compatibility library so that `(:~~:)` may be
+  used when compiling this library with GHC 8.0. This avoids having to redefine
+  `(:~~:)` directly in the internals of `constraints` itself.
+
+0.11.1 [2019.08.27]
+-------------------
+* Make `Data.Constraint.Deferrable.UnsatisfiedConstraint` a newtype.
+
+0.11 [2019.05.10]
+-----------------
+* Introduce a `HasDict` type class for types that witness evidence of
+  constraints, such as `Dict`, `(:-)`, `Coercion`, `(:~:)`, `(:~~:)`, and
+  `TypeRep`.
+* Generalize the types of `withDict` and `(\\)` to be polymorphic over
+  any `HasDict` instance.
+* Add `type (⊢) = (:-)`.
+* Fix unsafe mistakes in the statements of `dividesDef` and `timesDiv` in
+  `Data.Constraint.Nat`.
+* Make the implementations of `Min` and `Max` reduce on more inputs in
+  `Data.Constraint.Nat`.
+* Add `minusNat` and `minusZero` functions to `Data.Constraint.Nat`.
+* Support `hashable-1.3.*` and `semigroups-0.19.*`.
+
 0.10.1 [2018.07.02]
 -------------------
 * Allow building with GHC 8.6.
@@ -41,7 +66,7 @@
     when a type mismatch error is thrown
   * Add `defer_` and `deferEither_`, counterparts to `defer` and `deferEither`
     which do not require proxy arguments
-  * Enable `PolyKinds`. This allows the `Deferrable (a ~ b` instance to be
+  * Enable `PolyKinds`. This allows the `Deferrable (a ~ b)` instance to be
     polykinded on all supported versions of GHC _except_ 7.10, where the kinds
     must be `*` due to an old GHC bug
   * Introduce a heterogeneous equality type `(:~~:)`, and use it to define a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/constraints-0.10.1/constraints.cabal 
new/constraints-0.11.2/constraints.cabal
--- old/constraints-0.10.1/constraints.cabal    2018-07-03 02:15:10.000000000 
+0200
+++ new/constraints-0.11.2/constraints.cabal    2001-09-09 03:46:40.000000000 
+0200
@@ -1,6 +1,6 @@
 name:          constraints
 category:      Constraints
-version:       0.10.1
+version:       0.11.2
 license:       BSD2
 cabal-version: >= 1.10
 license-file:  LICENSE
@@ -21,8 +21,9 @@
              , GHC == 7.10.3
              , GHC == 8.0.2
              , GHC == 8.2.2
-             , GHC == 8.4.3
-             , GHC == 8.6.1
+             , GHC == 8.4.4
+             , GHC == 8.6.5
+             , GHC == 8.8.1
 extra-source-files: README.markdown
                   , CHANGELOG.markdown
 
@@ -51,11 +52,12 @@
     binary >= 0.7.1 && < 0.9,
     deepseq >= 1.3 && < 1.5,
     ghc-prim,
-    hashable >= 1.2 && < 1.3,
+    hashable >= 1.2 && < 1.4,
     mtl >= 2.1.2 && < 2.3,
-    semigroups >= 0.17 && < 0.19,
+    semigroups >= 0.17 && < 0.20,
     transformers >= 0.3.0.0 && < 0.6,
-    transformers-compat >= 0.5 && < 1
+    transformers-compat >= 0.5 && < 1,
+    type-equality >= 1 && < 2
 
   exposed-modules:
     Data.Constraint
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/constraints-0.10.1/src/Data/Constraint/Deferrable.hs 
new/constraints-0.11.2/src/Data/Constraint/Deferrable.hs
--- old/constraints-0.10.1/src/Data/Constraint/Deferrable.hs    2018-07-03 
02:15:10.000000000 +0200
+++ new/constraints-0.11.2/src/Data/Constraint/Deferrable.hs    2001-09-09 
03:46:40.000000000 +0200
@@ -49,13 +49,10 @@
 
 #if __GLASGOW_HASKELL__ >= 800
 import GHC.Types (type (~~))
+import Data.Type.Equality.Hetero ((:~~:)(HRefl))
 #endif
 
-#if __GLASGOW_HASKELL__ >= 801
-import Data.Type.Equality ((:~~:)(HRefl))
-#endif
-
-data UnsatisfiedConstraint = UnsatisfiedConstraint String
+newtype UnsatisfiedConstraint = UnsatisfiedConstraint String
   deriving (Typeable, Show)
 
 instance Exception UnsatisfiedConstraint
@@ -86,16 +83,6 @@
 deferEither_ r = deferEither @p Proxy r
 #endif
 
-#if __GLASGOW_HASKELL__ >= 800 && __GLASGOW_HASKELL__ < 801
--- | Kind heterogeneous propositional equality. Like '(:~:)', @a :~~: b@ is
--- inhabited by a terminating value if and only if @a@ is the same type as @b@.
---
--- Only available on GHC 8.0 or later.
-data (a :: i) :~~: (b :: j) where
-  HRefl :: a :~~: a
-    deriving Typeable
-#endif
-
 showTypeRep :: Typeable t => Proxy t -> String
 showTypeRep = show . typeRep
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/constraints-0.10.1/src/Data/Constraint/Forall.hs 
new/constraints-0.11.2/src/Data/Constraint/Forall.hs
--- old/constraints-0.10.1/src/Data/Constraint/Forall.hs        2018-07-03 
02:15:10.000000000 +0200
+++ new/constraints-0.11.2/src/Data/Constraint/Forall.hs        2001-09-09 
03:46:40.000000000 +0200
@@ -40,6 +40,12 @@
 import Data.Constraint
 import Unsafe.Coerce (unsafeCoerce)
 
+#if __GLASGOW_HASKELL__ >= 806
+# define KVS(kvs) kvs
+#else
+# define KVS(kvs)
+#endif
+
 {- The basic trick of this module is to use "skolem" types as test candidates
  - for whether a class predicate holds, and if so assume that it holds for all
  - types, unsafely coercing the typeclass dictionary.
@@ -143,7 +149,7 @@
 instance Forall (Q p t) => ForallT p t
 
 -- | Instantiate a quantified @'ForallT' p t@ constraint at types @f@ and @a@.
-instT :: forall (p :: k4 -> Constraint) (t :: (k1 -> k2) -> k3 -> k4) (f :: k1 
-> k2) (a :: k3). ForallT p t :- p (t f a)
+instT :: forall KVS(k1 k2 k3 k4) (p :: k4 -> Constraint) (t :: (k1 -> k2) -> 
k3 -> k4) (f :: k1 -> k2) (a :: k3). ForallT p t :- p (t f a)
 instT = Sub $
   case inst :: Forall (Q p t) :- Q p t f of { Sub Dict ->
   case inst :: Forall (R p t f) :- R p t f a of
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/constraints-0.10.1/src/Data/Constraint/Nat.hs 
new/constraints-0.11.2/src/Data/Constraint/Nat.hs
--- old/constraints-0.10.1/src/Data/Constraint/Nat.hs   2018-07-03 
02:15:10.000000000 +0200
+++ new/constraints-0.11.2/src/Data/Constraint/Nat.hs   2001-09-09 
03:46:40.000000000 +0200
@@ -10,6 +10,7 @@
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE AllowAmbiguousTypes #-}
 {-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE UndecidableInstances #-}
 #if __GLASGOW_HASKELL__ >= 805
 {-# LANGUAGE NoStarIsType #-}
 #endif
@@ -18,8 +19,8 @@
 -- This module is only available on GHC 8.0 or later.
 module Data.Constraint.Nat
   ( Min, Max, Lcm, Gcd, Divides, Div, Mod
-  , plusNat, timesNat, powNat, minNat, maxNat, gcdNat, lcmNat, divNat, modNat
-  , plusZero, timesZero, timesOne, powZero, powOne, maxZero, minZero, gcdZero, 
gcdOne, lcmZero, lcmOne
+  , plusNat, minusNat, timesNat, powNat, minNat, maxNat, gcdNat, lcmNat, 
divNat, modNat
+  , plusZero, minusZero, timesZero, timesOne, powZero, powOne, maxZero, 
minZero, gcdZero, gcdOne, lcmZero, lcmOne
   , plusAssociates, timesAssociates, minAssociates, maxAssociates, 
gcdAssociates, lcmAssociates
   , plusCommutes, timesCommutes, minCommutes, maxCommutes, gcdCommutes, 
lcmCommutes
   , plusDistributesOverTimes, timesDistributesOverPow, 
timesDistributesOverGcd, timesDistributesOverLcm
@@ -47,13 +48,14 @@
 
 import Data.Constraint
 import Data.Proxy
+import Data.Type.Bool
 import GHC.TypeLits
 import Unsafe.Coerce
 
 type family Min (m::Nat) (n::Nat) :: Nat where
-    Min m m = m
+    Min m n = If (n <=? m) n m
 type family Max (m::Nat) (n::Nat) :: Nat where
-    Max m m = m
+    Max m n = If (n <=? m) m n
 #if !(MIN_VERSION_base(4,11,0))
 type family Div (m::Nat) (n::Nat) :: Nat where
     Div m 1 = m
@@ -114,6 +116,9 @@
 plusNat :: forall n m. (KnownNat n, KnownNat m) :- KnownNat (n + m)
 plusNat = magic (+)
 
+minusNat :: forall n m. (KnownNat n, KnownNat m, m <= n) :- KnownNat (n - m)
+minusNat = Sub $ case magic @n @m (-) of Sub r -> r
+
 minNat   :: forall n m. (KnownNat n, KnownNat m) :- KnownNat (Min n m)
 minNat = magic min
 
@@ -135,6 +140,9 @@
 plusZero :: forall n. Dict ((n + 0) ~ n)
 plusZero = Dict
 
+minusZero :: forall n. Dict ((n - 0) ~ n)
+minusZero = Dict
+
 timesZero :: forall n. Dict ((n * 0) ~ 0)
 timesZero = Dict
 
@@ -142,10 +150,10 @@
 timesOne = Dict
 
 minZero :: forall n. Dict (Min n 0 ~ 0)
-minZero = axiom
+minZero = Dict
 
 maxZero :: forall n. Dict (Max n 0 ~ n)
-maxZero = axiom
+maxZero = Dict
 
 powZero :: forall n. Dict ((n ^ 0) ~ 1)
 powZero = Dict
@@ -324,13 +332,13 @@
 dividesMax :: (Divides a b, Divides a c) :- Divides a (Max b c)
 dividesMax = Sub axiom
 
-dividesDef :: forall a b. Divides a b :- ((a * Div b a) ~ a)
+dividesDef :: forall a b. Divides a b :- ((a * Div b a) ~ b)
 dividesDef = Sub axiom
 
 dividesPow :: (1 <= n, Divides a b) :- Divides a (b^n)
 dividesPow = Sub axiom
 
-timesDiv :: forall a b. Dict ((a * Div b a) <= a)
+timesDiv :: forall a b. Dict ((a * Div b a) <= b)
 timesDiv = axiom
 
 -- (<=) is an internal category in the category of constraints.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/constraints-0.10.1/src/Data/Constraint.hs 
new/constraints-0.11.2/src/Data/Constraint.hs
--- old/constraints-0.10.1/src/Data/Constraint.hs       2018-07-03 
02:15:10.000000000 +0200
+++ new/constraints-0.11.2/src/Data/Constraint.hs       2001-09-09 
03:46:40.000000000 +0200
@@ -11,12 +11,17 @@
 {-# LANGUAGE EmptyDataDecls #-}
 {-# LANGUAGE KindSignatures #-}
 {-# LANGUAGE TypeOperators #-}
+{-# LANGUAGE UnicodeSyntax #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE Trustworthy #-}
 {-# LANGUAGE Rank2Types #-}
 {-# LANGUAGE GADTs #-}
 {-# LANGUAGE CPP #-}
+#if __GLASGOW_HASKELL__ >= 706
+{-# LANGUAGE PolyKinds #-}
+#endif
 #if __GLASGOW_HASKELL__ >= 800
+{-# LANGUAGE TypeInType #-}
 {-# LANGUAGE UndecidableSuperClasses #-}
 #endif
 #if __GLASGOW_HASKELL__ >= 708 && __GLASGOW_HASKELL__ < 710
@@ -56,10 +61,12 @@
     Constraint
   -- * Dictionary
   , Dict(Dict)
+  , HasDict(..)
   , withDict
+  , (\\)
   -- * Entailment
   , (:-)(Sub)
-  , (\\)
+  , type (⊢)
   , weaken1, weaken2, contract
   , strengthen1, strengthen2
   , (&&&), (***)
@@ -78,11 +85,14 @@
 import Control.DeepSeq
 import Control.Monad
 import Data.Complex
+#if __GLASGOW_HASKELL__ >= 800 && __GLASGOW_HASKELL__ < 806
+import Data.Kind
+#endif
 import Data.Ratio
 #if !MIN_VERSION_base(4,11,0)
 import Data.Semigroup
 #endif
-import Data.Data
+import Data.Data hiding (TypeRep)
 import qualified GHC.Exts as Exts (Any)
 import GHC.Exts (Constraint)
 import Data.Bits (Bits)
@@ -93,6 +103,15 @@
 #if !MIN_VERSION_base(4,8,0)
 import Data.Word (Word)
 #endif
+import Data.Coerce (Coercible)
+import Data.Type.Coercion(Coercion(..))
+#if MIN_VERSION_base(4,9,0)
+import Data.Type.Equality (type (~~))
+import qualified Data.Type.Equality.Hetero as Hetero
+#endif
+#if MIN_VERSION_base(4,10,0)
+import Type.Reflection (TypeRep, typeRepKind, withTypeable)
+#endif
 
 -- | Values of type @'Dict' p@ capture a dictionary for a constraint of type 
@p@.
 --
@@ -136,17 +155,60 @@
 instance NFData (Dict c) where
   rnf Dict = ()
 
+-- | Witnesses that a value of type @e@ contains evidence of the constraint 
@c@.
+--
+-- Mainly intended to allow ('\\') to be overloaded, since it's a useful 
operator.
+class HasDict c e | e -> c where
+  evidence :: e -> Dict c
+
+instance HasDict a (Dict a) where
+  evidence = Prelude.id
+
+instance a => HasDict b (a :- b) where
+  evidence (Sub x) = x
+
+instance HasDict (Coercible a b) (Coercion a b) where
+  evidence Coercion = Dict
+
+instance HasDict (a ~ b) (a :~: b) where
+  evidence Refl = Dict
+
+#if MIN_VERSION_base(4,9,0)
+instance HasDict (a ~~ b) (a Hetero.:~~: b) where
+  evidence Hetero.HRefl = Dict
+#endif
+
+#if MIN_VERSION_base(4,10,0)
+instance HasDict (Typeable k, Typeable a) (TypeRep (a :: k)) where
+  evidence tr = withTypeable tr $ withTypeable (typeRepKind tr) Dict
+#endif
+
 -- | From a 'Dict', takes a value in an environment where the instance
 -- witnessed by the 'Dict' is in scope, and evaluates it.
 --
 -- Essentially a deconstruction of a 'Dict' into its continuation-style
 -- form.
 --
-withDict :: Dict a -> (a => r) -> r
-withDict d r = case d of
+-- Can also be used to deconstruct an entailment, @a ':-' b@, using a context 
@a@.
+--
+-- @
+-- withDict :: 'Dict' c -> (c => r) -> r
+-- withDict :: a => (a ':-' c) -> (c => r) -> r
+-- @
+withDict :: HasDict c e => e -> (c => r) -> r
+withDict d r = case evidence d of
                  Dict -> r
 
+infixl 1 \\ -- required comment
+
+-- | Operator version of 'withDict', with the arguments flipped
+(\\) :: HasDict c e => (c => r) -> e -> r
+r \\ d = withDict d r
+
 infixr 9 :-
+infixr 9 ⊢
+
+type (⊢) = (:-)
 
 -- | This is the type of entailment.
 --
@@ -245,12 +307,6 @@
 instance a => NFData (a :- b) where
   rnf (Sub Dict) = ()
 
-infixl 1 \\ -- required comment
-
--- | Given that @a :- b@, derive something that needs a context @b@, using the 
context @a@
-(\\) :: a => (b => r) -> (a :- b) -> r
-r \\ Sub Dict = r
-
 
--------------------------------------------------------------------------------
 -- Constraints form a Category
 
--------------------------------------------------------------------------------


Reply via email to