sop-core 0.5.0.0 → 0.5.0.1
raw patch · 7 files changed
+25/−9 lines, 7 filesdep ~basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base
API changes (from Hackage documentation)
- Data.SOP: data Proxy (t :: k)
- Data.SOP.BasicFunctors: instance forall l k (f :: l -> *) (g :: k -> l) (a :: k). Control.DeepSeq.NFData (f (g a)) => Control.DeepSeq.NFData ((Data.SOP.BasicFunctors.:.:) f g a)
- Data.SOP.BasicFunctors: instance forall l k (f :: l -> *) (g :: k -> l) (x :: k). GHC.Base.Monoid (f (g x)) => GHC.Base.Monoid ((Data.SOP.BasicFunctors.:.:) f g x)
- Data.SOP.BasicFunctors: instance forall l k (f :: l -> *) (g :: k -> l) (x :: k). GHC.Base.Semigroup (f (g x)) => GHC.Base.Semigroup ((Data.SOP.BasicFunctors.:.:) f g x)
- Data.SOP.Constraint: instance forall a b (xs :: [a]) (ys :: [b]) (c :: a -> b -> GHC.Types.Constraint). (Data.SOP.Constraint.SListI xs, Data.SOP.Constraint.SListI ys, Data.SOP.Constraint.SameShapeAs xs ys, Data.SOP.Constraint.SameShapeAs ys xs, Data.SOP.Constraint.AllZipF c xs ys) => Data.SOP.Constraint.AllZip c xs ys
- Data.SOP.Constraint: instance forall k1 k2 (f :: k1 -> GHC.Types.Constraint) (g :: k2 -> k1) (x :: k2). f (g x) => Data.SOP.Constraint.Compose f g x
- Data.SOP.Constraint: instance forall k1 k2 k3 (f :: k1 -> k2) (x :: k1) (g :: k3 -> k2) (y :: k3). GHC.Types.Coercible (f x) (g y) => Data.SOP.Constraint.LiftedCoercible f g x y
+ Data.SOP: data Proxy (t :: k) :: forall k. () => k -> Type
+ Data.SOP.BasicFunctors: instance forall k l (f :: l -> *) (g :: k -> l) (a :: k). Control.DeepSeq.NFData (f (g a)) => Control.DeepSeq.NFData ((Data.SOP.BasicFunctors.:.:) f g a)
+ Data.SOP.BasicFunctors: instance forall k l (f :: l -> *) (g :: k -> l) (x :: k). GHC.Base.Monoid (f (g x)) => GHC.Base.Monoid ((Data.SOP.BasicFunctors.:.:) f g x)
+ Data.SOP.BasicFunctors: instance forall k l (f :: l -> *) (g :: k -> l) (x :: k). GHC.Base.Semigroup (f (g x)) => GHC.Base.Semigroup ((Data.SOP.BasicFunctors.:.:) f g x)
+ Data.SOP.Constraint: instance forall b a (xs :: [a]) (ys :: [b]) (c :: a -> b -> GHC.Types.Constraint). (Data.SOP.Constraint.SListI xs, Data.SOP.Constraint.SListI ys, Data.SOP.Constraint.SameShapeAs xs ys, Data.SOP.Constraint.SameShapeAs ys xs, Data.SOP.Constraint.AllZipF c xs ys) => Data.SOP.Constraint.AllZip c xs ys
+ Data.SOP.Constraint: instance forall k1 k2 (f :: k2 -> GHC.Types.Constraint) (g :: k1 -> k2) (x :: k1). f (g x) => Data.SOP.Constraint.Compose f g x
+ Data.SOP.Constraint: instance forall k1 k2 k0 (f :: k2 -> k0) (x :: k2) (g :: k1 -> k0) (y :: k1). GHC.Types.Coercible (f x) (g y) => Data.SOP.Constraint.LiftedCoercible f g x y
- Data.SOP: Comp :: f (g p) -> (:.:) (f :: l -> Type) (g :: k -> l) (p :: k)
+ Data.SOP: Comp :: f (g p) -> (:.:)
- Data.SOP: I :: a -> I (a :: Type)
+ Data.SOP: I :: a -> I
- Data.SOP: K :: a -> K (a :: Type) (b :: k)
+ Data.SOP: K :: a -> K
- Data.SOP: POP :: NP (NP f) xss -> POP (f :: k -> Type) (xss :: [[k]])
+ Data.SOP: POP :: NP (NP f) xss -> POP
- Data.SOP: Proxy :: Proxy (t :: k)
+ Data.SOP: Proxy :: Proxy
- Data.SOP: SOP :: NS (NP f) xss -> SOP (f :: k -> Type) (xss :: [[k]])
+ Data.SOP: SOP :: NS (NP f) xss -> SOP
- Data.SOP: hcoerce :: (HTrans h1 h2, AllZipN (Prod h1) (LiftedCoercible f g) xs ys, HTrans h1 h2) => h1 f xs -> h2 g ys
+ Data.SOP: hcoerce :: (HTrans h1 h2, AllZipN (Prod h1) (LiftedCoercible f g) xs ys) => h1 f xs -> h2 g ys
- Data.SOP: lengthSList :: forall (xs :: [k]) proxy. SListI xs => proxy xs -> Int
+ Data.SOP: lengthSList :: forall k (xs :: [k]) proxy. SListI xs => proxy xs -> Int
- Data.SOP: shape :: forall (xs :: [k]). SListI xs => Shape xs
+ Data.SOP: shape :: forall k (xs :: [k]). SListI xs => Shape xs
- Data.SOP.BasicFunctors: Comp :: f (g p) -> (:.:) (f :: l -> Type) (g :: k -> l) (p :: k)
+ Data.SOP.BasicFunctors: Comp :: f (g p) -> (:.:)
- Data.SOP.BasicFunctors: I :: a -> I (a :: Type)
+ Data.SOP.BasicFunctors: I :: a -> I
- Data.SOP.BasicFunctors: K :: a -> K (a :: Type) (b :: k)
+ Data.SOP.BasicFunctors: K :: a -> K
- Data.SOP.Classes: hcoerce :: (HTrans h1 h2, AllZipN (Prod h1) (LiftedCoercible f g) xs ys, HTrans h1 h2) => h1 f xs -> h2 g ys
+ Data.SOP.Classes: hcoerce :: (HTrans h1 h2, AllZipN (Prod h1) (LiftedCoercible f g) xs ys) => h1 f xs -> h2 g ys
- Data.SOP.NP: POP :: NP (NP f) xss -> POP (f :: k -> Type) (xss :: [[k]])
+ Data.SOP.NP: POP :: NP (NP f) xss -> POP
- Data.SOP.NS: SOP :: NS (NP f) xss -> SOP (f :: k -> Type) (xss :: [[k]])
+ Data.SOP.NS: SOP :: NS (NP f) xss -> SOP
- Data.SOP.Sing: lengthSList :: forall (xs :: [k]) proxy. SListI xs => proxy xs -> Int
+ Data.SOP.Sing: lengthSList :: forall k (xs :: [k]) proxy. SListI xs => proxy xs -> Int
- Data.SOP.Sing: shape :: forall (xs :: [k]). SListI xs => Shape xs
+ Data.SOP.Sing: shape :: forall k (xs :: [k]). SListI xs => Shape xs
Files
- CHANGELOG.md +4/−0
- sop-core.cabal +7/−4
- src/Data/SOP/BasicFunctors.hs +2/−0
- src/Data/SOP/Classes.hs +1/−1
- src/Data/SOP/Dict.hs +2/−2
- src/Data/SOP/NP.hs +2/−0
- src/Data/SOP/Sing.hs +7/−2
CHANGELOG.md view
@@ -1,3 +1,7 @@+# 0.5.0.1 (2020-03-29)++* Compatiblity with GHC-8.10 (thanks to Ryan Scott).+ # 0.5.0.0 (2019-05-09) * Add `ejections` that computes a product of functions
sop-core.cabal view
@@ -1,5 +1,5 @@ name: sop-core-version: 0.5.0.0+version: 0.5.0.1 synopsis: True Sums of Products description: Implementation of n-ary sums and n-ary products.@@ -25,7 +25,7 @@ build-type: Simple cabal-version: >=1.10 extra-source-files: CHANGELOG.md doctest.sh-tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5+tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.2, GHC == 8.10.1 source-repository head type: git@@ -41,7 +41,7 @@ Data.SOP.NP Data.SOP.NS Data.SOP.Sing- build-depends: base >= 4.9 && < 5,+ build-depends: base >= 4.9 && < 4.15, deepseq >= 1.3 && < 1.5 hs-source-dirs: src default-language: Haskell2010@@ -64,7 +64,10 @@ KindSignatures DataKinds FunctionalDependencies- AutoDeriveTypeable++ if impl(ghc <8.2)+ default-extensions: AutoDeriveTypeable+ -- if impl(ghc >= 8.6) -- default-extensions: NoStarIsType other-extensions: PolyKinds
src/Data/SOP/BasicFunctors.hs view
@@ -43,7 +43,9 @@ , mapKKK ) where +#if !MIN_VERSION_base(4,11,0) import Data.Semigroup (Semigroup (..))+#endif import Data.Kind (Type) import qualified GHC.Generics as GHC
src/Data/SOP/Classes.hs view
@@ -653,7 +653,7 @@ -- @since 0.3.1.0 -- hcoerce ::- (AllZipN (Prod h1) (LiftedCoercible f g) xs ys, HTrans h1 h2)+ AllZipN (Prod h1) (LiftedCoercible f g) xs ys => h1 f xs -> h2 g ys -- | Specialization of 'hcoerce'.
src/Data/SOP/Dict.hs view
@@ -68,7 +68,7 @@ mapAll2 :: forall c d xss . (forall a . Dict c a -> Dict d a) -> Dict (All2 c) xss -> Dict (All2 d) xss-mapAll2 f d @ Dict = (all2 . mapAll (mapAll f) . unAll2) d+mapAll2 f d@Dict = (all2 . mapAll (mapAll f) . unAll2) d -- | If two constraints 'c' and 'd' hold over a type-level -- list 'xs', then the combination of both constraints holds@@ -77,7 +77,7 @@ -- @since 0.2 -- zipAll :: Dict (All c) xs -> Dict (All d) xs -> Dict (All (c `And` d)) xs-zipAll dc @ Dict dd = all_NP (hzipWith (\ Dict Dict -> Dict) (unAll_NP dc) (unAll_NP dd))+zipAll dc@Dict dd = all_NP (hzipWith (\ Dict Dict -> Dict) (unAll_NP dc) (unAll_NP dd)) -- | If two constraints 'c' and 'd' hold over a type-level -- list of lists 'xss', then the combination of both constraints
src/Data/SOP/NP.hs view
@@ -91,7 +91,9 @@ import Data.Kind (Type) import Data.Proxy (Proxy(..)) import Unsafe.Coerce+#if !MIN_VERSION_base(4,11,0) import Data.Semigroup (Semigroup (..))+#endif import Control.DeepSeq (NFData(..))
src/Data/SOP/Sing.hs view
@@ -1,4 +1,9 @@ {-# LANGUAGE PolyKinds, StandaloneDeriving #-}+#if __GLASGOW_HASKELL__ < 806+-- Before GHC 8.6, TypeInType was required to explicitly quantify kind variables.+-- After GHC 8.6, this feature was incorporated into PolyKinds.+{-# LANGUAGE TypeInType #-}+#endif -- | Singleton types corresponding to type-level data structures. -- -- The implementation is similar, but subtly different to that of the@@ -93,7 +98,7 @@ deriving instance Ord (Shape xs) -- | The shape of a type-level list.-shape :: forall (xs :: [k]). SListI xs => Shape xs+shape :: forall k (xs :: [k]). SListI xs => Shape xs shape = case sList :: SList xs of SNil -> ShapeNil SCons -> ShapeCons shape@@ -102,7 +107,7 @@ -- -- @since 0.2 ---lengthSList :: forall (xs :: [k]) proxy. SListI xs => proxy xs -> Int+lengthSList :: forall k (xs :: [k]) proxy. SListI xs => proxy xs -> Int lengthSList _ = lengthShape (shape :: Shape xs) where lengthShape :: forall xs'. Shape xs' -> Int