packages feed

hetero-parameter-list 0.1.0.20 → 0.1.0.21

raw patch · 2 files changed

+12/−2 lines, 2 filesPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

API changes (from Hackage documentation)

+ Data.HeteroParList: class Map' (f :: k -> k') ss where {
+ Data.HeteroParList: instance forall a k' (f :: a -> k') (ss :: [a]) (s :: a). Data.HeteroParList.Map' f ss => Data.HeteroParList.Map' f (s : ss)
+ Data.HeteroParList: instance forall k k' (f :: k -> k'). Data.HeteroParList.Map' f '[]
+ Data.HeteroParList: map' :: Map' f ss => (forall s. t s -> t' (f s)) -> PL t ss -> PL t' (S' f ss)
+ Data.HeteroParList: type S' f ss :: [k'];

Files

hetero-parameter-list.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           hetero-parameter-list-version:        0.1.0.20+version:        0.1.0.21 synopsis:       hetero list with parameter list description:    Please see the README on GitHub at <https://github.com/YoshikuniJujo/hetero-parameter-list#readme> category:       Data
src/Data/HeteroParList.hs view
@@ -74,7 +74,7 @@  	-- * Map and ReplicateM -	map, mapM, mapM_, MapM'(..),+	map, mapM, mapM_, Map'(..), MapM'(..), 	Rep(..), RepM(..), replicate, replicateM, replicateMWithI  	) where@@ -395,6 +395,16 @@ mapM_ f = \case 	Nil -> pure () 	x :** xs -> f x *> mapM_ f xs++class Map' (f :: k -> k') ss where+	type S' f ss :: [k']+	map' :: (forall s . t s -> (t' (f s))) -> PL t ss -> PL t' (S' f ss)++instance Map' f '[] where type S' f '[] = '[]; map' _ Nil = Nil++instance Map' f ss => Map' f (s ': ss) where+	type S' f (s ': ss) = f s ': S' f ss+	map' g (x :** xs) = g x :** map' g xs  class MapM' (f :: k -> k') ss where 	type Ss' f ss :: [k']