these-0.7.3: An either-or-both data type & a generalized 'zip with padding' typeclass

Safe HaskellNone
LanguageHaskell98

Data.Align.Key

Description

These-based zipping and unzipping of indexed functors.

Synopsis

Documentation

class (Keyed f, Align f) => AlignWithKey f where #

Keyed version of Align.

Methods

alignWithKey :: (Key f -> These a b -> c) -> f a -> f b -> f c #

Analogous to alignWith, but also provides an index.

Instances

AlignWithKey [] # 

Methods

alignWithKey :: (Key [] -> These a b -> c) -> [a] -> [b] -> [c] #

AlignWithKey Maybe # 

Methods

alignWithKey :: (Key Maybe -> These a b -> c) -> Maybe a -> Maybe b -> Maybe c #

AlignWithKey IntMap # 

Methods

alignWithKey :: (Key IntMap -> These a b -> c) -> IntMap a -> IntMap b -> IntMap c #

AlignWithKey Seq # 

Methods

alignWithKey :: (Key Seq -> These a b -> c) -> Seq a -> Seq b -> Seq c #

AlignWithKey Vector # 

Methods

alignWithKey :: (Key Vector -> These a b -> c) -> Vector a -> Vector b -> Vector c #

(Eq k, Hashable k) => AlignWithKey (HashMap k) # 

Methods

alignWithKey :: (Key (HashMap k) -> These a b -> c) -> HashMap k a -> HashMap k b -> HashMap k c #

Ord k => AlignWithKey (Map k) # 

Methods

alignWithKey :: (Key (Map k) -> These a b -> c) -> Map k a -> Map k b -> Map k c #