constraint-classes 0.1.0 → 0.2.0
raw patch · 2 files changed
+1/−30 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
- Control.ConstraintClasses: type CFol f a = ();
- Control.ConstraintClasses: type CFun f a = ();
- Control.ConstraintClasses: type family CFol f a :: Constraint;
- Control.ConstraintClasses: }
- Control.ConstraintClasses.Extras: class CFunctor f => CZippable f where czipWith f x y = cmap (uncurry f) (czip x y) czipWith3 f x y z = cmap ((uncurry . uncurry) f) (czip (czip x y) z)
- Control.ConstraintClasses.Extras: czip :: (CZippable f, CFun f a, CFun f b, CFun f (a, b)) => f a -> f b -> f (a, b)
- Control.ConstraintClasses.Extras: czipWith :: (CZippable f, CFun f a, CFun f b, CFun f (a, b), CFun f c) => (a -> b -> c) -> f a -> f b -> f c
- Control.ConstraintClasses.Extras: czipWith3 :: (CZippable f, CFun f a, CFun f b, CFun f c, CFun f (a, b), CFun f ((a, b), c), CFun f d) => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
- Control.ConstraintClasses.Extras: czipWith4 :: (CZippable f, CFun f a, CFun f b, CFun f c, CFun f d, CFun f e) => (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e
- Control.ConstraintClasses: class CFoldable f where type CFol f a :: Constraint type CFol f a = () cfold = cfoldMap id cfoldMap f = cfoldr (mappend . f) mempty clength = cfoldl (\ c _ -> c + 1) 0 cforM = flip cmapM cforM_ = flip cmapM_ where {
+ Control.ConstraintClasses: class CFoldable f where type family CFol f a :: Constraint CFol f a = () cfold = cfoldMap id cfoldMap f = cfoldr (mappend . f) mempty clength = cfoldl (\ c _ -> c + 1) 0 cforM = flip cmapM cforM_ = flip cmapM_
- Control.ConstraintClasses: class CFunctor f where type CFun f a :: Constraint type CFun f a = () where {
+ Control.ConstraintClasses: class CFunctor f where type family CFun f a :: Constraint CFun f a = ()
Files
constraint-classes.cabal view
@@ -1,5 +1,5 @@ name: constraint-classes-version: 0.1.0+version: 0.2.0 synopsis: Prelude classes using ConstraintKinds description: Please see README.org homepage: http://github.com/guaraqe/constraint-classes#readme@@ -14,7 +14,6 @@ library hs-source-dirs: src exposed-modules: Control.ConstraintClasses- , Control.ConstraintClasses.Extras build-depends: base >= 4.7 && < 5 default-language: Haskell2010
− src/Control/ConstraintClasses/Extras.hs
@@ -1,28 +0,0 @@-module Control.ConstraintClasses.Extras- ( CZippable (..) ) where--import Control.ConstraintClasses--class CFunctor f => CZippable f where- czip :: (CFun f a, CFun f b, CFun f (a,b))- => f a -> f b -> f (a,b)-- czipWith :: ( CFun f a- , CFun f b- , CFun f (a,b)- , CFun f c)- => (a -> b -> c) -> f a -> f b -> f c- czipWith f x y = cmap (uncurry f) (czip x y)-- czipWith3 :: ( CFun f a- , CFun f b- , CFun f c- , CFun f (a,b)- , CFun f ((a,b),c)- , CFun f d )- => (a -> b -> c -> d) -> f a -> f b -> f c -> f d- czipWith3 f x y z = cmap ((uncurry . uncurry) f)- (czip (czip x y) z)-- czipWith4 :: (CFun f a, CFun f b, CFun f c, CFun f d, CFun f e)- => (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e