Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-some for openSUSE:Factory checked in at 2026-11-24 12:34:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-some (Old) and /work/SRC/openSUSE:Factory/.ghc-some.new.1340718 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-some" Tue Nov 24 12:34:45 2026 rev:14 rq:1399335 version:1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-some/ghc-some.changes 2026-06-10 16:10:16.291281081 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-some.new.1340718/ghc-some.changes 2026-11-24 12:42:11.916532955 +0100 @@ -1,0 +2,9 @@ +Sun May 10 17:20:15 UTC 2026 - Peter Simons <[email protected]> + +- Update some to version 1.1. + # 1.1 + + - Add `EqP` as a superclass of `GEq`, and `OrdP` as a superclass of `GCompare`. + - Relax `Eq` and `Ord` instances of `Some` to require just `EqP` and `OrdP`. + +------------------------------------------------------------------- Old: ---- some-1.0.6.tar.gz some.cabal New: ---- some-1.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-some.spec ++++++ --- /var/tmp/diff_new_pack.xzKWTj/_old 2026-11-24 12:42:12.931575969 +0100 +++ /var/tmp/diff_new_pack.xzKWTj/_new 2026-11-24 12:42:12.933576054 +0100 @@ -1,7 +1,7 @@ # # spec file for package ghc-some # -# Copyright (c) 2026 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,23 +17,25 @@ %global pkg_name some -%global pkgver %{pkg_name}-%{version} +%bcond_with ghc_prof %bcond_with tests -Name: ghc-%{pkg_name} -Version: 1.0.6 +Name: ghc-%pkg_name +Version: 1.1 Release: 0 +%global pkgver %pkg_name-%{version} Summary: Existential type: Some License: BSD-3-Clause -URL: https://hackage.haskell.org/package/%{pkg_name} -Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz -Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/3.cabal#/%{pkg_name}.cabal +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 BuildRequires: ghc-base-devel -BuildRequires: ghc-base-prof BuildRequires: ghc-deepseq-devel -BuildRequires: ghc-deepseq-prof -BuildRequires: ghc-rpm-macros +BuildRequires: ghc-rpm-macros >= 2.9.2 ExcludeArch: %{ix86} +%if %{with ghc_prof} +BuildRequires: ghc-base-prof +BuildRequires: ghc-deepseq-prof +%endif %description This library defines an existential type 'Some'. @@ -54,25 +56,27 @@ %description devel This package provides the Haskell %{pkg_name} library development files. -%package -n ghc-%{pkg_name}-doc +%package -n ghc-%pkg_name-doc Summary: Haskell %{pkg_name} library documentation Requires: ghc-filesystem BuildArch: noarch -%description -n ghc-%{pkg_name}-doc +%description -n ghc-%pkg_name-doc This package provides the Haskell %{pkg_name} library documentation. -%package -n ghc-%{pkg_name}-prof +%if %{with ghc_prof} +%package -n ghc-%pkg_name-prof Summary: Haskell %{pkg_name} profiling library -Requires: ghc-%{pkg_name}-devel = %{version}-%{release} -Supplements: (ghc-%{pkg_name}-devel and ghc-prof) +Requires: ghc-%pkg_name-devel = %{version}-%{release} +Supplements: (ghc-%pkg_name-devel and ghc-prof) -%description -n ghc-%{pkg_name}-prof +%description -n ghc-%pkg_name-prof This package provides the Haskell %{pkg_name} profiling library. +%endif + %prep -%autosetup -n %{pkg_name}-%{version} -cp -p %{SOURCE1} %{pkg_name}.cabal +%autosetup -p1 -n %pkg_name-%{version} %build %ghc_lib_build @@ -95,8 +99,10 @@ %files devel -f %{name}-devel.files %doc ChangeLog.md -%files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files +%files -n ghc-%pkg_name-doc -f ghc-%pkg_name-doc.files %license LICENSE -%files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files +%if %{with ghc_prof} +%files -n ghc-%pkg_name-prof -f ghc-%pkg_name-prof.files +%endif ++++++ some-1.0.6.tar.gz -> some-1.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/some-1.0.6/ChangeLog.md new/some-1.1/ChangeLog.md --- old/some-1.0.6/ChangeLog.md 2001-09-09 03:46:40.000000000 +0200 +++ new/some-1.1/ChangeLog.md 2001-09-09 03:46:40.000000000 +0200 @@ -1,3 +1,8 @@ +# 1.1 + +- Add `EqP` as a superclass of `GEq`, and `OrdP` as a superclass of `GCompare`. +- Relax `Eq` and `Ord` instances of `Some` to require just `EqP` and `OrdP`. + # 1.0.6 - Add instances for `SSymbol`, `SNat` and `SChar` from `base >=4.18.0.0' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/some-1.0.6/some.cabal new/some-1.1/some.cabal --- old/some-1.0.6/some.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/some-1.1/some.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,12 +1,12 @@ +cabal-version: 2.4 name: some -version: 1.0.6 -cabal-version: >=1.10 +version: 1.1 build-type: Simple author: James Cook <[email protected]>, Oleg Grenrus <[email protected]> maintainer: Oleg Grenrus <[email protected]> -license: BSD3 +license: BSD-3-Clause license-file: LICENSE homepage: https://github.com/haskellari/some category: Data, Dependent Types @@ -24,16 +24,13 @@ If you are unsure which variant to use, use the one in "Data.Some" module. tested-with: - GHC ==8.6.5 - || ==8.8.4 - || ==8.10.4 - || ==9.0.2 - || ==9.2.8 - || ==9.4.7 - || ==9.6.3 - || ==9.8.1 + GHC ==9.6.7 + || ==9.8.4 + || ==9.10.2 + || ==9.12.2 + || ==9.14.1 -extra-source-files: ChangeLog.md +extra-doc-files: ChangeLog.md flag newtype-unsafe description: @@ -68,20 +65,15 @@ other-modules: Data.GADT.Internal build-depends: - base >=4.12 && <4.20 - , deepseq >=1.4.4.0 && <1.6 + base >=4.18 && <4.23 + , deepseq >=1.4.8.1 && <1.6 if !impl(ghc >= 9.8) build-depends: base-orphans >= 0.9.1 && <0.10 - if impl(ghc >=9.0) - -- these flags may abort compilation with GHC-8.10 - -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295 - ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode - - if impl(ghc >=9.1) - ghc-options: -Wmissing-kind-signatures + ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode + ghc-options: -Wmissing-kind-signatures test-suite hkd-example default-language: Haskell2010 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/some-1.0.6/src/Data/EqP.hs new/some-1.1/src/Data/EqP.hs --- old/some-1.0.6/src/Data/EqP.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/some-1.1/src/Data/EqP.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,28 +1,24 @@ -{-# LANGUAGE CPP #-} -{-# LANGUAGE PolyKinds #-} -{-# LANGUAGE QuantifiedConstraints #-} -{-# LANGUAGE Safe #-} -{-# LANGUAGE TypeOperators #-} -#if __GLASGOW_HASKELL__ >= 810 +{-# LANGUAGE CPP #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE QuantifiedConstraints #-} +{-# LANGUAGE Safe #-} {-# LANGUAGE StandaloneKindSignatures #-} -#endif +{-# LANGUAGE TypeOperators #-} module Data.EqP ( EqP (..), ) where import Control.Applicative (Const (..)) -import Data.Kind (Type) +import Data.Kind (Constraint, Type) import Data.Proxy (Proxy (..)) import Data.Type.Equality ((:~:) (..), (:~~:) (..)) import GHC.Generics ((:*:) (..), (:+:) (..)) import System.Mem.StableName (StableName, eqStableName) +import Data.Functor.Product (Product (..)) +import Data.Functor.Sum (Sum (..)) -#if MIN_VERSION_base(4,18,0) -import Data.Functor.Product (Product (..)) -import Data.Functor.Sum (Sum (..)) -import qualified GHC.TypeLits as TL -import qualified GHC.TypeNats as TN -#endif +import qualified GHC.TypeLits as TL +import qualified GHC.TypeNats as TN #if !MIN_VERSION_base(4,19,0) import Data.Orphans () @@ -30,9 +26,6 @@ import qualified Type.Reflection as TR -#if __GLASGOW_HASKELL__ >= 810 -import Data.Kind (Constraint) -#endif -- | Heterogenous lifted equality. -- @@ -60,9 +53,7 @@ -- /Note:/ P stands for phantom. -- -- @since 1.0.5 -#if __GLASGOW_HASKELL__ >= 810 type EqP :: (k -> Type) -> Constraint -#endif class (forall a. Eq (f a)) => EqP (f :: k -> Type) where eqp :: f a -> f b -> Bool @@ -72,8 +63,6 @@ instance EqP ((:~~:) a) where eqp _ _ = True - -#if MIN_VERSION_base(4,18,0) instance (EqP a, EqP b) => EqP (Sum a b) where eqp (InL x) (InL y) = eqp x y eqp (InR x) (InR y) = eqp x y @@ -81,7 +70,6 @@ instance (EqP a, EqP b) => EqP (Product a b) where eqp (Pair x y) (Pair x' y') = eqp x x' && eqp y y' -#endif instance (EqP f, EqP g) => EqP (f :+: g) where eqp (L1 x) (L1 y) = eqp x y @@ -94,7 +82,6 @@ instance EqP TR.TypeRep where eqp x y = TR.SomeTypeRep x == TR.SomeTypeRep y -#if MIN_VERSION_base(4,18,0) instance EqP TL.SChar where eqp x y = TL.fromSChar x == TL.fromSChar y @@ -103,7 +90,6 @@ instance EqP TN.SNat where eqp x y = TN.fromSNat x == TN.fromSNat y -#endif instance EqP Proxy where eqp _ _ = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/some-1.0.6/src/Data/GADT/Compare.hs new/some-1.1/src/Data/GADT/Compare.hs --- old/some-1.0.6/src/Data/GADT/Compare.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/some-1.1/src/Data/GADT/Compare.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,4 +1,3 @@ -{-# LANGUAGE CPP #-} {-# LANGUAGE Safe #-} module Data.GADT.Compare ( -- * Equality diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/some-1.0.6/src/Data/GADT/DeepSeq.hs new/some-1.1/src/Data/GADT/DeepSeq.hs --- old/some-1.0.6/src/Data/GADT/DeepSeq.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/some-1.1/src/Data/GADT/DeepSeq.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,30 +1,21 @@ -{-# LANGUAGE CPP #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE Safe #-} -{-# LANGUAGE TypeOperators #-} -#if __GLASGOW_HASKELL__ >= 810 {-# LANGUAGE StandaloneKindSignatures #-} -#endif +{-# LANGUAGE TypeOperators #-} module Data.GADT.DeepSeq ( GNFData (..), ) where import Data.Functor.Product (Product (..)) import Data.Functor.Sum (Sum (..)) +import Data.Kind (Constraint, Type) import Data.Type.Equality ((:~:) (..), (:~~:) (..)) import GHC.Generics ((:*:) (..), (:+:) (..)) import qualified Type.Reflection as TR -#if __GLASGOW_HASKELL__ >= 810 -import Data.Kind (Constraint, Type) -#endif - -#if __GLASGOW_HASKELL__ >= 810 type GNFData :: (k -> Type) -> Constraint -#endif - class GNFData f where grnf :: f a -> () diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/some-1.0.6/src/Data/GADT/Internal.hs new/some-1.1/src/Data/GADT/Internal.hs --- old/some-1.0.6/src/Data/GADT/Internal.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/some-1.1/src/Data/GADT/Internal.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,36 +1,29 @@ -{-# LANGUAGE CPP #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RoleAnnotations #-} {-# LANGUAGE Safe #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TypeOperators #-} -#if __GLASGOW_HASKELL__ >= 810 {-# LANGUAGE StandaloneKindSignatures #-} -#endif +{-# LANGUAGE TypeOperators #-} module Data.GADT.Internal where import Control.Applicative (Applicative (..)) import Data.Functor.Product (Product (..)) import Data.Functor.Sum (Sum (..)) -import Data.Kind (Type) +import Data.Kind (Constraint, Type) import Data.Maybe (isJust, isNothing) import Data.Monoid (Monoid (..)) import Data.Semigroup (Semigroup (..)) import Data.Type.Equality (TestEquality (..), (:~:) (..), (:~~:) (..)) import GHC.Generics ((:*:) (..), (:+:) (..)) -import qualified Type.Reflection as TR +import Data.EqP +import Data.OrdP -#if __GLASGOW_HASKELL__ >= 810 -import Data.Kind (Constraint) -#endif - -#if MIN_VERSION_base(4,18,0) -import qualified GHC.TypeLits as TL -import qualified GHC.TypeNats as TN -#endif +import qualified GHC.TypeLits as TL +import qualified GHC.TypeNats as TN +import qualified Type.Reflection as TR -- $setup -- >>> :set -XKindSignatures -XGADTs -XTypeOperators -XStandaloneDeriving -XQuantifiedConstraints @@ -44,9 +37,7 @@ -- to write (or derive) an @instance Show (T a)@, and then simply say: -- -- > instance GShow t where gshowsPrec = defaultGshowsPrec -#if __GLASGOW_HASKELL__ >= 810 type GShow :: (k -> Type) -> Constraint -#endif class GShow t where gshowsPrec :: Int -> t a -> ShowS @@ -73,7 +64,6 @@ instance GShow TR.TypeRep where gshowsPrec = showsPrec -#if MIN_VERSION_base(4,18,0) instance GShow TL.SChar where gshowsPrec = showsPrec @@ -82,7 +72,6 @@ instance GShow TN.SNat where gshowsPrec = showsPrec -#endif -- -- | >>> gshow (InL Refl :: Sum ((:~:) Int) ((:~:) Bool) Int) @@ -123,9 +112,7 @@ -- |@GReadS t@ is equivalent to @ReadS (forall b. (forall a. t a -> b) -> b)@, which is -- in turn equivalent to @ReadS (Exists t)@ (with @data Exists t where Exists :: t a -> Exists t@) -#if __GLASGOW_HASKELL__ >= 810 type GReadS :: (k -> Type) -> Type -#endif type GReadS t = String -> [(Some t, String)] getGReadResult :: Some tag -> (forall a. tag a -> b) -> b @@ -137,9 +124,7 @@ -- |'Read'-like class for 1-type-parameter GADTs. Unlike 'GShow', this one cannot be -- mechanically derived from a 'Read' instance because 'greadsPrec' must choose the phantom -- type based on the 'String' being parsed. -#if __GLASGOW_HASKELL__ >= 810 type GRead :: (k -> Type) -> Constraint -#endif class GRead t where greadsPrec :: Int -> GReadS t @@ -281,10 +266,8 @@ -- >>> (checkBwdGEq TagInt1 TagInt1, checkBwdGEq TagInt1 TagInt2, checkBwdGEq TagInt2 TagInt1, checkBwdGEq TagInt2 TagInt2) -- (True,True,True,True) -- -#if __GLASGOW_HASKELL__ >= 810 type GEq :: (k -> Type) -> Constraint -#endif -class GEq f where +class EqP f => GEq f where -- |Produce a witness of type-equality, if one exists. -- -- A handy idiom for using this would be to pattern-bind in the Maybe monad, eg.: @@ -355,7 +338,6 @@ instance GEq TR.TypeRep where geq = testEquality -#if MIN_VERSION_base(4,18,0) instance GEq TL.SChar where geq = testEquality @@ -364,7 +346,6 @@ instance GEq TN.SNat where geq = testEquality -#endif ------------------------------------------------------------------------------- -- GCompare @@ -399,9 +380,7 @@ -- |A type for the result of comparing GADT constructors; the type parameters -- of the GADT values being compared are included so that in the case where -- they are equal their parameter types can be unified. -#if __GLASGOW_HASKELL__ >= 810 type GOrdering :: k -> k -> Type -#endif data GOrdering a b where GLT :: GOrdering a b GEQ :: GOrdering t t @@ -439,10 +418,8 @@ -- |Type class for comparable GADT-like structures. When 2 things are equal, -- must return a witness that their parameter types are equal as well ('GEQ'). -#if __GLASGOW_HASKELL__ >= 810 type GCompare :: (k -> Type) -> Constraint -#endif -class GEq f => GCompare f where +class (GEq f, OrdP f) => GCompare f where gcompare :: f a -> f b -> GOrdering a b instance GCompare ((:~:) a) where @@ -455,7 +432,6 @@ instance GCompare TR.TypeRep where gcompare = gcompareSing "TypeRep" TR.SomeTypeRep -#if MIN_VERSION_base(4,18,0) instance GCompare TL.SChar where gcompare = gcompareSing "SChar" TL.fromSChar @@ -464,7 +440,6 @@ instance GCompare TN.SNat where gcompare = gcompareSing "SNat" TN.fromSNat -#endif defaultCompare :: GCompare f => f a -> f b -> Ordering defaultCompare x y = weakenOrdering (gcompare x y) @@ -567,9 +542,7 @@ -- >>> read "mkSome TagInt" :: Some Tag -- mkSome TagInt -- -#if __GLASGOW_HASKELL__ >= 810 type Some :: (k -> Type) -> Type -#endif newtype Some tag = S { -- | Eliminator. withSome :: forall r. (forall a. tag a -> r) -> r @@ -617,15 +590,15 @@ , (withTag, rest') <- greadsPrec 11 rest ] -instance GEq tag => Eq (Some tag) where +instance EqP tag => Eq (Some tag) where x == y = withSome x $ \x' -> - withSome y $ \y' -> defaultEq x' y' + withSome y $ \y' -> eqp x' y' -instance GCompare tag => Ord (Some tag) where +instance OrdP tag => Ord (Some tag) where compare x y = withSome x $ \x' -> - withSome y $ \y' -> defaultCompare x' y' + withSome y $ \y' -> comparep x' y' instance Control.Applicative.Applicative m => Data.Semigroup.Semigroup (Some m) where m <> n = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/some-1.0.6/src/Data/GADT/Show.hs new/some-1.1/src/Data/GADT/Show.hs --- old/some-1.0.6/src/Data/GADT/Show.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/some-1.1/src/Data/GADT/Show.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,4 +1,3 @@ -{-# LANGUAGE CPP #-} {-# LANGUAGE Safe #-} module Data.GADT.Show ( -- * Showing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/some-1.0.6/src/Data/OrdP.hs new/some-1.1/src/Data/OrdP.hs --- old/some-1.0.6/src/Data/OrdP.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/some-1.1/src/Data/OrdP.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,28 +1,23 @@ -{-# LANGUAGE CPP #-} -{-# LANGUAGE PolyKinds #-} -{-# LANGUAGE QuantifiedConstraints #-} -{-# LANGUAGE Safe #-} -{-# LANGUAGE TypeOperators #-} -#if __GLASGOW_HASKELL__ >= 810 +{-# LANGUAGE CPP #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE QuantifiedConstraints #-} +{-# LANGUAGE Safe #-} {-# LANGUAGE StandaloneKindSignatures #-} -#endif +{-# LANGUAGE TypeOperators #-} module Data.OrdP ( OrdP (..), ) where import Control.Applicative (Const (..)) -import Data.Kind (Type) +import Data.Functor.Product (Product (..)) +import Data.Functor.Sum (Sum (..)) +import Data.Kind (Constraint, Type) import Data.Proxy (Proxy (..)) -import Data.Semigroup ((<>)) import Data.Type.Equality ((:~:) (..), (:~~:) (..)) import GHC.Generics ((:*:) (..), (:+:) (..)) -#if MIN_VERSION_base(4,18,0) -import Data.Functor.Product (Product (..)) -import Data.Functor.Sum (Sum (..)) import qualified GHC.TypeLits as TL import qualified GHC.TypeNats as TN -#endif #if !MIN_VERSION_base(4,19,0) import Data.Orphans () @@ -30,9 +25,6 @@ import qualified Type.Reflection as TR -#if __GLASGOW_HASKELL__ >= 810 -import Data.Kind (Constraint) -#endif import Data.EqP @@ -46,9 +38,7 @@ -- @ -- -- @since 1.0.5 -#if __GLASGOW_HASKELL__ >= 810 type OrdP :: (k -> Type) -> Constraint -#endif class (EqP f, forall a. Ord (f a)) => OrdP (f :: k -> Type) where comparep :: f a -> f b -> Ordering @@ -58,7 +48,6 @@ instance OrdP ((:~~:) a) where comparep _ _ = EQ -#if MIN_VERSION_base(4,18,0) instance (OrdP a, OrdP b) => OrdP (Sum a b) where comparep (InL x) (InL y) = comparep x y comparep (InL _) (InR _) = LT @@ -67,7 +56,6 @@ instance (OrdP a, OrdP b) => OrdP (Product a b) where comparep (Pair x y) (Pair x' y') = comparep x x' <> comparep y y' -#endif instance (OrdP f, OrdP g) => OrdP (f :+: g) where comparep (L1 x) (L1 y) = comparep x y @@ -81,7 +69,6 @@ instance OrdP TR.TypeRep where comparep x y = compare (TR.SomeTypeRep x) (TR.SomeTypeRep y) -#if MIN_VERSION_base(4,18,0) instance OrdP TL.SChar where comparep x y = compare (TL.fromSChar x) (TL.fromSChar y) @@ -90,7 +77,6 @@ instance OrdP TN.SNat where comparep x y = compare (TN.fromSNat x) (TN.fromSNat y) -#endif instance OrdP Proxy where comparep _ _ = EQ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/some-1.0.6/src/Data/Some/Church.hs new/some-1.1/src/Data/Some/Church.hs --- old/some-1.0.6/src/Data/Some/Church.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/some-1.1/src/Data/Some/Church.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,4 +1,3 @@ -{-# LANGUAGE CPP #-} {-# LANGUAGE Safe #-} module Data.Some.Church ( Some(..), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/some-1.0.6/src/Data/Some/GADT.hs new/some-1.1/src/Data/Some/GADT.hs --- old/some-1.0.6/src/Data/Some/GADT.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/some-1.1/src/Data/Some/GADT.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,12 +1,9 @@ -{-# LANGUAGE CPP #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RoleAnnotations #-} {-# LANGUAGE Safe #-} -#if __GLASGOW_HASKELL__ >= 810 {-# LANGUAGE StandaloneKindSignatures #-} -#endif module Data.Some.GADT ( Some(Some), mkSome, @@ -19,14 +16,12 @@ import Control.Applicative (Applicative (..)) import Control.DeepSeq (NFData (..)) +import Data.Kind (Type) import Data.Monoid (Monoid (..)) import Data.Semigroup (Semigroup (..)) -#if __GLASGOW_HASKELL__ >= 810 -import Data.Kind (Type) -#endif - -import Data.GADT.Compare +import Data.EqP +import Data.OrdP import Data.GADT.DeepSeq import Data.GADT.Show @@ -78,9 +73,7 @@ -- >>> read "mkSome TagInt" :: Some Tag -- Some TagInt -- -#if __GLASGOW_HASKELL__ >= 810 type Some :: (k -> Type) -> Type -#endif data Some tag where Some :: tag a -> Some tag @@ -126,11 +119,11 @@ , (withTag, rest') <- greadsPrec 11 rest ] -instance GEq tag => Eq (Some tag) where - Some x == Some y = defaultEq x y +instance EqP tag => Eq (Some tag) where + Some x == Some y = eqp x y -instance GCompare tag => Ord (Some tag) where - compare (Some x) (Some y) = defaultCompare x y +instance OrdP tag => Ord (Some tag) where + compare (Some x) (Some y) = comparep x y instance GNFData tag => NFData (Some tag) where rnf (Some x) = grnf x diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/some-1.0.6/src/Data/Some/Newtype.hs new/some-1.1/src/Data/Some/Newtype.hs --- old/some-1.0.6/src/Data/Some/Newtype.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/some-1.1/src/Data/Some/Newtype.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,13 +1,10 @@ -{-# LANGUAGE CPP #-} -{-# LANGUAGE GADTs #-} -{-# LANGUAGE RankNTypes #-} -{-# LANGUAGE PatternSynonyms #-} -{-# LANGUAGE RoleAnnotations #-} -{-# LANGUAGE PolyKinds #-} -{-# LANGUAGE Trustworthy #-} -#if __GLASGOW_HASKELL__ >= 810 +{-# LANGUAGE GADTs #-} +{-# LANGUAGE PatternSynonyms #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE RoleAnnotations #-} {-# LANGUAGE StandaloneKindSignatures #-} -#endif +{-# LANGUAGE Trustworthy #-} module Data.Some.Newtype ( Some(Some), mkSome, @@ -20,18 +17,16 @@ import Control.Applicative (Applicative (..)) import Control.DeepSeq (NFData (..)) +import Data.Kind (Type) import Data.Monoid (Monoid (..)) import Data.Semigroup (Semigroup (..)) import GHC.Exts (Any) import Unsafe.Coerce (unsafeCoerce) -#if __GLASGOW_HASKELL__ >= 810 -import Data.Kind (Type) -#endif - -import Data.GADT.Compare +import Data.EqP import Data.GADT.DeepSeq import Data.GADT.Show +import Data.OrdP -- $setup -- >>> :set -XKindSignatures -XGADTs @@ -80,13 +75,11 @@ -- >>> read "mkSome TagInt" :: Some Tag -- Some TagInt -- -#if __GLASGOW_HASKELL__ >= 810 type Some :: (k -> Type) -> Type -#endif newtype Some tag = UnsafeSome (tag Any) type role Some representational - + {-# COMPLETE Some #-} pattern Some :: tag a -> Some tag pattern Some x <- UnsafeSome x @@ -132,15 +125,15 @@ , (withTag, rest') <- greadsPrec 11 rest ] -instance GEq tag => Eq (Some tag) where +instance EqP tag => Eq (Some tag) where x == y = withSome x $ \x' -> - withSome y $ \y' -> defaultEq x' y' + withSome y $ \y' -> eqp x' y' -instance GCompare tag => Ord (Some tag) where +instance OrdP tag => Ord (Some tag) where compare x y = withSome x $ \x' -> - withSome y $ \y' -> defaultCompare x' y' + withSome y $ \y' -> comparep x' y' instance GNFData tag => NFData (Some tag) where rnf x = withSome x grnf
