    {-# LANGUAGE CPP                        #-}
    {-# LANGUAGE DeriveDataTypeable         #-}
    {-# LANGUAGE GeneralizedNewtypeDeriving #-}
    {-# LANGUAGE DeriveTraversable          #-}
    {-# LANGUAGE TypeFamilies               #-}

    -- |
    -- Module      :  $Header$
    -- Description :  Data.IntMap with Enum keys.
    -- Copyright   :  (c) 2011-2019 Michal Terepeta
    --                (c) 2019-2022 Mikolaj Konarski and others (see git history)
    -- License     :  BSD3
    -- Maintainer  :  mikolaj.konarski@funktory.com
    -- Stability   :  alpha
    -- Portability :  uses DeriveDataTypeable and GeneralizedNewtypeDeriving

    module Data.EnumMap.Base
      ( EnumMap(..)

      -- * Wrapping/unwrapping
      , intMapToEnumMap
      , enumMapToIntMap

      -- * Operators
      , (!)
      , (\\)

      -- * Query
      , null
      , size
      , member
      , notMember
      , lookup
      , findWithDefault
      , lookupLT
      , lookupGT
      , lookupLE
      , lookupGE

      -- * Construction
      , empty
      , singleton

      -- ** Insertion
      , insert
      , insertWith
      , insertWithKey
      , insertLookupWithKey

      -- ** Delete\/Update
      , delete
      , adjust
      , adjustWithKey
      , update
      , updateWithKey
      , updateLookupWithKey
      , alter
      , alterF

      -- * Combine

      -- ** Union
      , union
      , unionWith
      , unionWithKey
      , unions
      , unionsWith

      -- ** Difference
      , difference
      , differenceWith
      , differenceWithKey

      -- ** Intersection
      , intersection
      , intersectionWith
      , intersectionWithKey

      -- ** Universal combining function
      , mergeWithKey

      -- * Traversal
      -- ** Map
      , map
      , mapWithKey
      , traverseWithKey
      , mapAccum
      , mapAccumWithKey
      , mapAccumRWithKey
      , mapKeys
      , mapKeysWith
      , mapKeysMonotonic

      -- * Folds
      , foldr
      , foldl
      , foldrWithKey
      , foldlWithKey
      -- ** Strict folds
      , foldr'
      , foldl'
      , foldrWithKey'
      , foldlWithKey'

      -- * Conversion
      , elems
      , keys
      , assocs
      , keysSet
      , fromSet

      -- ** Lists
      , toList
      , fromList
      , fromListWith
      , fromListWithKey

      -- ** Ordered lists
      , toAscList
      , toDescList
      , fromAscList
      , fromAscListWith
      , fromAscListWithKey
      , fromDistinctAscList

      -- * Filter
      , filter
      , filterWithKey
    #if (MIN_VERSION_containers(0,5,8))
      , restrictKeys
      , withoutKeys
    #endif
      , partition
      , partitionWithKey

      , mapMaybe
      , mapMaybeWithKey
      , mapEither
      , mapEitherWithKey

      , split
      , splitLookup

      -- * Submap
      , isSubmapOf
      , isSubmapOfBy
      , isProperSubmapOf
      , isProperSubmapOfBy

      -- * Min\/Max
      , lookupMin
      , lookupMax
      , findMin
      , findMax
      , deleteMin
      , deleteMax
      , deleteFindMin
      , deleteFindMax
      , updateMin
      , updateMax
      , updateMinWithKey
      , updateMaxWithKey
      , minView
      , maxView
      , minViewWithKey
      , maxViewWithKey
      ) where

    import Prelude hiding ( Foldable(..), filter, lookup, map )
    import qualified Prelude as P

    import Control.Applicative ( Applicative, liftA )

    import Data.IntMap.Lazy ( IntMap )
    import qualified Data.IntMap.Lazy as I

    import Data.EnumSet ( EnumSet )
    import qualified Data.EnumSet as EnumSet

    import Control.Arrow ( first, second, (***) )
    import Control.DeepSeq ( NFData )
    import Data.Foldable ( Foldable )
    import Data.Monoid ( Monoid )
    import Data.Semigroup ( Semigroup )
    import Data.Traversable ( Traversable )
    import Data.Typeable ( Typeable )
    import Data.Aeson ( FromJSON(..), ToJSON(..) )
    import qualified GHC.Exts as IL
    import Text.Read

    -- | Wrapper for 'IntMap' with 'Enum' keys.
    newtype EnumMap k a = EnumMap { forall k a. EnumMap k a -> IntMap a
    unWrap :: IntMap a }
      deriving (EnumMap k a -> EnumMap k a -> Bool
    (EnumMap k a -> EnumMap k a -> Bool)
    -> (EnumMap k a -> EnumMap k a -> Bool) -> Eq (EnumMap k a)
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    forall k a. Eq a => EnumMap k a -> EnumMap k a -> Bool
    $c== :: forall k a. Eq a => EnumMap k a -> EnumMap k a -> Bool
    == :: EnumMap k a -> EnumMap k a -> Bool
    $c/= :: forall k a. Eq a => EnumMap k a -> EnumMap k a -> Bool
    /= :: EnumMap k a -> EnumMap k a -> Bool
    Eq, (forall m. Monoid m => EnumMap k m -> m)
    -> (forall m a. Monoid m => (a -> m) -> EnumMap k a -> m)
    -> (forall m a. Monoid m => (a -> m) -> EnumMap k a -> m)
    -> (forall a b. (a -> b -> b) -> b -> EnumMap k a -> b)
    -> (forall a b. (a -> b -> b) -> b -> EnumMap k a -> b)
    -> (forall b a. (b -> a -> b) -> b -> EnumMap k a -> b)
    -> (forall b a. (b -> a -> b) -> b -> EnumMap k a -> b)
    -> (forall a. (a -> a -> a) -> EnumMap k a -> a)
    -> (forall a. (a -> a -> a) -> EnumMap k a -> a)
    -> (forall a. EnumMap k a -> [a])
    -> (forall a. EnumMap k a -> Bool)
    -> (forall a. EnumMap k a -> Int)
    -> (forall a. Eq a => a -> EnumMap k a -> Bool)
    -> (forall a. Ord a => EnumMap k a -> a)
    -> (forall a. Ord a => EnumMap k a -> a)
    -> (forall a. Num a => EnumMap k a -> a)
    -> (forall a. Num a => EnumMap k a -> a)
    -> Foldable (EnumMap k)
    forall a. Eq a => a -> EnumMap k a -> Bool
    forall a. Num a => EnumMap k a -> a
    forall a. Ord a => EnumMap k a -> a
    forall m. Monoid m => EnumMap k m -> m
    forall a. EnumMap k a -> Bool
    forall a. EnumMap k a -> Int
    forall a. EnumMap k a -> [a]
    forall a. (a -> a -> a) -> EnumMap k a -> a
    forall k a. Eq a => a -> EnumMap k a -> Bool
    forall k a. Num a => EnumMap k a -> a
    forall k a. Ord a => EnumMap k a -> a
    forall k m. Monoid m => EnumMap k m -> m
    forall m a. Monoid m => (a -> m) -> EnumMap k a -> m
    forall k a. EnumMap k a -> Bool
    forall k a. EnumMap k a -> Int
    forall k a. EnumMap k a -> [a]
    forall b a. (b -> a -> b) -> b -> EnumMap k a -> b
    forall a b. (a -> b -> b) -> b -> EnumMap k a -> b
    forall k a. (a -> a -> a) -> EnumMap k a -> a
    forall k m a. Monoid m => (a -> m) -> EnumMap k a -> m
    forall k b a. (b -> a -> b) -> b -> EnumMap k a -> b
    forall k a b. (a -> b -> b) -> b -> EnumMap k a -> b
    forall (t :: * -> *).
    (forall m. Monoid m => t m -> m)
    -> (forall m a. Monoid m => (a -> m) -> t a -> m)
    -> (forall m a. Monoid m => (a -> m) -> t a -> m)
    -> (forall a b. (a -> b -> b) -> b -> t a -> b)
    -> (forall a b. (a -> b -> b) -> b -> t a -> b)
    -> (forall b a. (b -> a -> b) -> b -> t a -> b)
    -> (forall b a. (b -> a -> b) -> b -> t a -> b)
    -> (forall a. (a -> a -> a) -> t a -> a)
    -> (forall a. (a -> a -> a) -> t a -> a)
    -> (forall a. t a -> [a])
    -> (forall a. t a -> Bool)
    -> (forall a. t a -> Int)
    -> (forall a. Eq a => a -> t a -> Bool)
    -> (forall a. Ord a => t a -> a)
    -> (forall a. Ord a => t a -> a)
    -> (forall a. Num a => t a -> a)
    -> (forall a. Num a => t a -> a)
    -> Foldable t
    $cfold :: forall k m. Monoid m => EnumMap k m -> m
    fold :: forall m. Monoid m => EnumMap k m -> m
    $cfoldMap :: forall k m a. Monoid m => (a -> m) -> EnumMap k a -> m
    foldMap :: forall m a. Monoid m => (a -> m) -> EnumMap k a -> m
    $cfoldMap' :: forall k m a. Monoid m => (a -> m) -> EnumMap k a -> m
    foldMap' :: forall m a. Monoid m => (a -> m) -> EnumMap k a -> m
    $cfoldr :: forall k a b. (a -> b -> b) -> b -> EnumMap k a -> b
    foldr :: forall a b. (a -> b -> b) -> b -> EnumMap k a -> b
    $cfoldr' :: forall k a b. (a -> b -> b) -> b -> EnumMap k a -> b
    foldr' :: forall a b. (a -> b -> b) -> b -> EnumMap k a -> b
    $cfoldl :: forall k b a. (b -> a -> b) -> b -> EnumMap k a -> b
    foldl :: forall b a. (b -> a -> b) -> b -> EnumMap k a -> b
    $cfoldl' :: forall k b a. (b -> a -> b) -> b -> EnumMap k a -> b
    foldl' :: forall b a. (b -> a -> b) -> b -> EnumMap k a -> b
    $cfoldr1 :: forall k a. (a -> a -> a) -> EnumMap k a -> a
    foldr1 :: forall a. (a -> a -> a) -> EnumMap k a -> a
    $cfoldl1 :: forall k a. (a -> a -> a) -> EnumMap k a -> a
    foldl1 :: forall a. (a -> a -> a) -> EnumMap k a -> a
    $ctoList :: forall k a. EnumMap k a -> [a]
    toList :: forall a. EnumMap k a -> [a]
    $cnull :: forall k a. EnumMap k a -> Bool
    null :: forall a. EnumMap k a -> Bool
    $clength :: forall k a. EnumMap k a -> Int
    length :: forall a. EnumMap k a -> Int
    $celem :: forall k a. Eq a => a -> EnumMap k a -> Bool
    elem :: forall a. Eq a => a -> EnumMap k a -> Bool
    $cmaximum :: forall k a. Ord a => EnumMap k a -> a
    maximum :: forall a. Ord a => EnumMap k a -> a
    $cminimum :: forall k a. Ord a => EnumMap k a -> a
    minimum :: forall a. Ord a => EnumMap k a -> a
    $csum :: forall k a. Num a => EnumMap k a -> a
    sum :: forall a. Num a => EnumMap k a -> a
    $cproduct :: forall k a. Num a => EnumMap k a -> a
    product :: forall a. Num a => EnumMap k a -> a
    Foldable, (forall a b. (a -> b) -> EnumMap k a -> EnumMap k b)
    -> (forall a b. a -> EnumMap k b -> EnumMap k a)
    -> Functor (EnumMap k)
    forall a b. a -> EnumMap k b -> EnumMap k a
    forall a b. (a -> b) -> EnumMap k a -> EnumMap k b
    forall k a b. a -> EnumMap k b -> EnumMap k a
    forall k a b. (a -> b) -> EnumMap k a -> EnumMap k b
    forall (f :: * -> *).
    (forall a b. (a -> b) -> f a -> f b)
    -> (forall a b. a -> f b -> f a) -> Functor f
    $cfmap :: forall k a b. (a -> b) -> EnumMap k a -> EnumMap k b
    fmap :: forall a b. (a -> b) -> EnumMap k a -> EnumMap k b
    $c<$ :: forall k a b. a -> EnumMap k b -> EnumMap k a
    <$ :: forall a b. a -> EnumMap k b -> EnumMap k a
    Functor, Eq (EnumMap k a)
    Eq (EnumMap k a) =>
    (EnumMap k a -> EnumMap k a -> Ordering)
    -> (EnumMap k a -> EnumMap k a -> Bool)
    -> (EnumMap k a -> EnumMap k a -> Bool)
    -> (EnumMap k a -> EnumMap k a -> Bool)
    -> (EnumMap k a -> EnumMap k a -> Bool)
    -> (EnumMap k a -> EnumMap k a -> EnumMap k a)
    -> (EnumMap k a -> EnumMap k a -> EnumMap k a)
    -> Ord (EnumMap k a)
    EnumMap k a -> EnumMap k a -> Bool
    EnumMap k a -> EnumMap k a -> Ordering
    EnumMap k a -> EnumMap k a -> EnumMap k a
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall k a. Ord a => Eq (EnumMap k a)
    forall k a. Ord a => EnumMap k a -> EnumMap k a -> Bool
    forall k a. Ord a => EnumMap k a -> EnumMap k a -> Ordering
    forall k a. Ord a => EnumMap k a -> EnumMap k a -> EnumMap k a
    $ccompare :: forall k a. Ord a => EnumMap k a -> EnumMap k a -> Ordering
    compare :: EnumMap k a -> EnumMap k a -> Ordering
    $c< :: forall k a. Ord a => EnumMap k a -> EnumMap k a -> Bool
    < :: EnumMap k a -> EnumMap k a -> Bool
    $c<= :: forall k a. Ord a => EnumMap k a -> EnumMap k a -> Bool
    <= :: EnumMap k a -> EnumMap k a -> Bool
    $c> :: forall k a. Ord a => EnumMap k a -> EnumMap k a -> Bool
    > :: EnumMap k a -> EnumMap k a -> Bool
    $c>= :: forall k a. Ord a => EnumMap k a -> EnumMap k a -> Bool
    >= :: EnumMap k a -> EnumMap k a -> Bool
    $cmax :: forall k a. Ord a => EnumMap k a -> EnumMap k a -> EnumMap k a
    max :: EnumMap k a -> EnumMap k a -> EnumMap k a
    $cmin :: forall k a. Ord a => EnumMap k a -> EnumMap k a -> EnumMap k a
    min :: EnumMap k a -> EnumMap k a -> EnumMap k a
    Ord, NonEmpty (EnumMap k a) -> EnumMap k a
    EnumMap k a -> EnumMap k a -> EnumMap k a
    (EnumMap k a -> EnumMap k a -> EnumMap k a)
    -> (NonEmpty (EnumMap k a) -> EnumMap k a)
    -> (forall b. Integral b => b -> EnumMap k a -> EnumMap k a)
    -> Semigroup (EnumMap k a)
    forall b. Integral b => b -> EnumMap k a -> EnumMap k a
    forall a.
    (a -> a -> a)
    -> (NonEmpty a -> a)
    -> (forall b. Integral b => b -> a -> a)
    -> Semigroup a
    forall k a. NonEmpty (EnumMap k a) -> EnumMap k a
    forall k a. EnumMap k a -> EnumMap k a -> EnumMap k a
    forall k a b. Integral b => b -> EnumMap k a -> EnumMap k a
    $c<> :: forall k a. EnumMap k a -> EnumMap k a -> EnumMap k a
    <> :: EnumMap k a -> EnumMap k a -> EnumMap k a
    $csconcat :: forall k a. NonEmpty (EnumMap k a) -> EnumMap k a
    sconcat :: NonEmpty (EnumMap k a) -> EnumMap k a
    $cstimes :: forall k a b. Integral b => b -> EnumMap k a -> EnumMap k a
    stimes :: forall b. Integral b => b -> EnumMap k a -> EnumMap k a
    Semigroup, Semigroup (EnumMap k a)
    EnumMap k a
    Semigroup (EnumMap k a) =>
    EnumMap k a
    -> (EnumMap k a -> EnumMap k a -> EnumMap k a)
    -> ([EnumMap k a] -> EnumMap k a)
    -> Monoid (EnumMap k a)
    [EnumMap k a] -> EnumMap k a
    EnumMap k a -> EnumMap k a -> EnumMap k a
    forall a.
    Semigroup a =>
    a -> (a -> a -> a) -> ([a] -> a) -> Monoid a
    forall k a. Semigroup (EnumMap k a)
    forall k a. EnumMap k a
    forall k a. [EnumMap k a] -> EnumMap k a
    forall k a. EnumMap k a -> EnumMap k a -> EnumMap k a
    $cmempty :: forall k a. EnumMap k a
    mempty :: EnumMap k a
    $cmappend :: forall k a. EnumMap k a -> EnumMap k a -> EnumMap k a
    mappend :: EnumMap k a -> EnumMap k a -> EnumMap k a
    $cmconcat :: forall k a. [EnumMap k a] -> EnumMap k a
    mconcat :: [EnumMap k a] -> EnumMap k a
    Monoid,
                Functor (EnumMap k)
    Foldable (EnumMap k)
    (Functor (EnumMap k), Foldable (EnumMap k)) =>
    (forall (f :: * -> *) a b.
     Applicative f =>
     (a -> f b) -> EnumMap k a -> f (EnumMap k b))
    -> (forall (f :: * -> *) a.
        Applicative f =>
        EnumMap k (f a) -> f (EnumMap k a))
    -> (forall (m :: * -> *) a b.
        Monad m =>
        (a -> m b) -> EnumMap k a -> m (EnumMap k b))
    -> (forall (m :: * -> *) a.
        Monad m =>
        EnumMap k (m a) -> m (EnumMap k a))
    -> Traversable (EnumMap k)
    forall k. Functor (EnumMap k)
    forall k. Foldable (EnumMap k)
    forall k (m :: * -> *) a.
    Monad m =>
    EnumMap k (m a) -> m (EnumMap k a)
    forall k (f :: * -> *) a.
    Applicative f =>
    EnumMap k (f a) -> f (EnumMap k a)
    forall k (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> EnumMap k a -> m (EnumMap k b)
    forall k (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> EnumMap k a -> f (EnumMap k b)
    forall (t :: * -> *).
    (Functor t, Foldable t) =>
    (forall (f :: * -> *) a b.
     Applicative f =>
     (a -> f b) -> t a -> f (t b))
    -> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
    -> (forall (m :: * -> *) a b.
        Monad m =>
        (a -> m b) -> t a -> m (t b))
    -> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
    -> Traversable t
    forall (m :: * -> *) a.
    Monad m =>
    EnumMap k (m a) -> m (EnumMap k a)
    forall (f :: * -> *) a.
    Applicative f =>
    EnumMap k (f a) -> f (EnumMap k a)
    forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> EnumMap k a -> m (EnumMap k b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> EnumMap k a -> f (EnumMap k b)
    $ctraverse :: forall k (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> EnumMap k a -> f (EnumMap k b)
    traverse :: forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> EnumMap k a -> f (EnumMap k b)
    $csequenceA :: forall k (f :: * -> *) a.
    Applicative f =>
    EnumMap k (f a) -> f (EnumMap k a)
    sequenceA :: forall (f :: * -> *) a.
    Applicative f =>
    EnumMap k (f a) -> f (EnumMap k a)
    $cmapM :: forall k (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> EnumMap k a -> m (EnumMap k b)
    mapM :: forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> EnumMap k a -> m (EnumMap k b)
    $csequence :: forall k (m :: * -> *) a.
    Monad m =>
    EnumMap k (m a) -> m (EnumMap k a)
    sequence :: forall (m :: * -> *) a.
    Monad m =>
    EnumMap k (m a) -> m (EnumMap k a)
    Traversable, Typeable, EnumMap k a -> ()
    (EnumMap k a -> ()) -> NFData (EnumMap k a)
    forall a. (a -> ()) -> NFData a
    forall k a. NFData a => EnumMap k a -> ()
    $crnf :: forall k a. NFData a => EnumMap k a -> ()
    rnf :: EnumMap k a -> ()
    NFData)

    instance (Enum k, Show k, Show a) => Show (EnumMap k a) where
      showsPrec :: Int -> EnumMap k a -> ShowS
    showsPrec Int
    p EnumMap k a
    em = Bool -> ShowS -> ShowS
    showParen (Int
    p Int -> Int -> Bool
    forall a. Ord a => a -> a -> Bool
    > Int
    10) (ShowS -> ShowS) -> ShowS -> ShowS
    forall a b. (a -> b) -> a -> b
    $
        String -> ShowS
    showString String
    "fromList " ShowS -> ShowS -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . [(k, a)] -> ShowS
    forall a. Show a => a -> ShowS
    shows (EnumMap k a -> [(k, a)]
    forall k a. Enum k => EnumMap k a -> [(k, a)]
    toList EnumMap k a
    em)

    instance (Enum k, Read k, Read a) => Read (EnumMap k a) where
      readPrec :: ReadPrec (EnumMap k a)
    readPrec = ReadPrec (EnumMap k a) -> ReadPrec (EnumMap k a)
    forall a. ReadPrec a -> ReadPrec a
    parens (ReadPrec (EnumMap k a) -> ReadPrec (EnumMap k a))
    -> (ReadPrec (EnumMap k a) -> ReadPrec (EnumMap k a))
    -> ReadPrec (EnumMap k a)
    -> ReadPrec (EnumMap k a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> ReadPrec (EnumMap k a) -> ReadPrec (EnumMap k a)
    forall a. Int -> ReadPrec a -> ReadPrec a
    prec Int
    10 (ReadPrec (EnumMap k a) -> ReadPrec (EnumMap k a))
    -> ReadPrec (EnumMap k a) -> ReadPrec (EnumMap k a)
    forall a b. (a -> b) -> a -> b
    $ do
        Ident "fromList" <- ReadPrec Lexeme
    lexP
        fromList <$> readPrec

    instance (ToJSON a) => ToJSON (EnumMap k a) where
        toJSON :: EnumMap k a -> Value
    toJSON = IntMap a -> Value
    forall a. ToJSON a => a -> Value
    toJSON (IntMap a -> Value)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> Value
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
        toEncoding :: EnumMap k a -> Encoding
    toEncoding = IntMap a -> Encoding
    forall a. ToJSON a => a -> Encoding
    toEncoding (IntMap a -> Encoding)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> Encoding
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap

    instance (FromJSON a) => FromJSON (EnumMap k a) where
        parseJSON :: Value -> Parser (EnumMap k a)
    parseJSON = ([(Int, a)] -> EnumMap k a)
    -> Parser [(Int, a)] -> Parser (EnumMap k a)
    forall a b. (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap (IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> ([(Int, a)] -> IntMap a) -> [(Int, a)] -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . [(Int, a)] -> IntMap a
    forall a. [(Int, a)] -> IntMap a
    I.fromList) (Parser [(Int, a)] -> Parser (EnumMap k a))
    -> (Value -> Parser [(Int, a)]) -> Value -> Parser (EnumMap k a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Value -> Parser [(Int, a)]
    forall a. FromJSON a => Value -> Parser a
    parseJSON

    instance (Enum k) => IL.IsList (EnumMap k a) where
      type Item (EnumMap k a) = (k, a)

      toList :: EnumMap k a -> [Item (EnumMap k a)]
    toList = ((Int, a) -> (k, a)) -> [(Int, a)] -> [(k, a)]
    forall a b. (a -> b) -> [a] -> [b]
    P.map ((Int -> k) -> (Int, a) -> (k, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first Int -> k
    forall a. Enum a => Int -> a
    toEnum) ([(Int, a)] -> [(k, a)])
    -> (EnumMap k a -> [(Int, a)]) -> EnumMap k a -> [(k, a)]
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . IntMap a -> [(Int, a)]
    forall a. IntMap a -> [(Int, a)]
    I.toList (IntMap a -> [(Int, a)])
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> [(Int, a)]
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
      {-# INLINE toList #-}

      fromList :: [Item (EnumMap k a)] -> EnumMap k a
    fromList = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> ([(k, a)] -> IntMap a) -> [(k, a)] -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . [(Int, a)] -> IntMap a
    forall a. [(Int, a)] -> IntMap a
    I.fromList ([(Int, a)] -> IntMap a)
    -> ([(k, a)] -> [(Int, a)]) -> [(k, a)] -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ((k, a) -> (Int, a)) -> [(k, a)] -> [(Int, a)]
    forall a b. (a -> b) -> [a] -> [b]
    P.map ((k -> Int) -> (k, a) -> (Int, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first k -> Int
    forall a. Enum a => a -> Int
    fromEnum)
      {-# INLINE fromList #-}

    --
    -- Conversion to/from 'IntMap'.
    --

    -- | Wrap 'IntMap'.
    intMapToEnumMap :: IntMap a -> EnumMap k a
    intMapToEnumMap :: forall a k. IntMap a -> EnumMap k a
    intMapToEnumMap = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap
    {-# INLINE intMapToEnumMap #-}

    -- | Unwrap 'IntMap'.
    enumMapToIntMap :: EnumMap k a -> IntMap a
    enumMapToIntMap :: forall k a. EnumMap k a -> IntMap a
    enumMapToIntMap = EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE enumMapToIntMap #-}

    --
    -- Here begins the main part.
    --

    (!) :: (Enum k) => EnumMap k a -> k -> a
    (EnumMap IntMap a
    im) ! :: forall k a. Enum k => EnumMap k a -> k -> a
    ! k
    k = IntMap a
    im IntMap a -> Int -> a
    forall a. IntMap a -> Int -> a
    I.! (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k)
    {-# INLINE (!) #-}

    (\\) :: EnumMap k a -> EnumMap k b -> EnumMap k a
    (EnumMap IntMap a
    im1) \\ :: forall k a b. EnumMap k a -> EnumMap k b -> EnumMap k a
    \\ (EnumMap IntMap b
    im2) = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a) -> IntMap a -> EnumMap k a
    forall a b. (a -> b) -> a -> b
    $ IntMap a
    im1 IntMap a -> IntMap b -> IntMap a
    forall a b. IntMap a -> IntMap b -> IntMap a
    I.\\ IntMap b
    im2
    {-# INLINE (\\) #-}

    null :: EnumMap k a -> Bool
    null :: forall k a. EnumMap k a -> Bool
    null = IntMap a -> Bool
    forall a. IntMap a -> Bool
    I.null (IntMap a -> Bool)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> Bool
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE null #-}

    size :: EnumMap k a -> Int
    size :: forall k a. EnumMap k a -> Int
    size = IntMap a -> Int
    forall a. IntMap a -> Int
    I.size (IntMap a -> Int)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> Int
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE size #-}

    member :: (Enum k) => k -> EnumMap k a -> Bool
    member :: forall k a. Enum k => k -> EnumMap k a -> Bool
    member k
    k = Int -> IntMap a -> Bool
    forall a. Int -> IntMap a -> Bool
    I.member (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) (IntMap a -> Bool)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> Bool
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE member #-}

    notMember :: (Enum k) => k -> EnumMap k a -> Bool
    notMember :: forall k a. Enum k => k -> EnumMap k a -> Bool
    notMember k
    k = Int -> IntMap a -> Bool
    forall a. Int -> IntMap a -> Bool
    I.notMember (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) (IntMap a -> Bool)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> Bool
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE notMember #-}

    lookup :: (Enum k) => k -> EnumMap k a -> Maybe a
    lookup :: forall k a. Enum k => k -> EnumMap k a -> Maybe a
    lookup k
    k = Int -> IntMap a -> Maybe a
    forall a. Int -> IntMap a -> Maybe a
    I.lookup (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) (IntMap a -> Maybe a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> Maybe a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE lookup #-}

    findWithDefault :: (Enum k) => a -> k -> EnumMap k a -> a
    findWithDefault :: forall k a. Enum k => a -> k -> EnumMap k a -> a
    findWithDefault a
    def k
    k = a -> Int -> IntMap a -> a
    forall a. a -> Int -> IntMap a -> a
    I.findWithDefault a
    def (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) (IntMap a -> a) -> (EnumMap k a -> IntMap a) -> EnumMap k a -> a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE findWithDefault #-}

    lookupLT :: (Enum k) => k -> EnumMap k a -> Maybe (k, a)
    lookupLT :: forall k a. Enum k => k -> EnumMap k a -> Maybe (k, a)
    lookupLT k
    k = ((Int, a) -> (k, a)) -> Maybe (Int, a) -> Maybe (k, a)
    forall a b. (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap ((Int -> k) -> (Int, a) -> (k, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first Int -> k
    forall a. Enum a => Int -> a
    toEnum) (Maybe (Int, a) -> Maybe (k, a))
    -> (EnumMap k a -> Maybe (Int, a)) -> EnumMap k a -> Maybe (k, a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> IntMap a -> Maybe (Int, a)
    forall a. Int -> IntMap a -> Maybe (Int, a)
    I.lookupLT (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) (IntMap a -> Maybe (Int, a))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> Maybe (Int, a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE lookupLT #-}

    lookupGT :: (Enum k) => k -> EnumMap k a -> Maybe (k, a)
    lookupGT :: forall k a. Enum k => k -> EnumMap k a -> Maybe (k, a)
    lookupGT k
    k = ((Int, a) -> (k, a)) -> Maybe (Int, a) -> Maybe (k, a)
    forall a b. (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap ((Int -> k) -> (Int, a) -> (k, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first Int -> k
    forall a. Enum a => Int -> a
    toEnum) (Maybe (Int, a) -> Maybe (k, a))
    -> (EnumMap k a -> Maybe (Int, a)) -> EnumMap k a -> Maybe (k, a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> IntMap a -> Maybe (Int, a)
    forall a. Int -> IntMap a -> Maybe (Int, a)
    I.lookupGT (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) (IntMap a -> Maybe (Int, a))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> Maybe (Int, a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE lookupGT #-}

    lookupLE :: (Enum k) => k -> EnumMap k a -> Maybe (k, a)
    lookupLE :: forall k a. Enum k => k -> EnumMap k a -> Maybe (k, a)
    lookupLE k
    k = ((Int, a) -> (k, a)) -> Maybe (Int, a) -> Maybe (k, a)
    forall a b. (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap ((Int -> k) -> (Int, a) -> (k, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first Int -> k
    forall a. Enum a => Int -> a
    toEnum) (Maybe (Int, a) -> Maybe (k, a))
    -> (EnumMap k a -> Maybe (Int, a)) -> EnumMap k a -> Maybe (k, a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> IntMap a -> Maybe (Int, a)
    forall a. Int -> IntMap a -> Maybe (Int, a)
    I.lookupLE (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) (IntMap a -> Maybe (Int, a))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> Maybe (Int, a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE lookupLE #-}

    lookupGE :: (Enum k) => k -> EnumMap k a -> Maybe (k, a)
    lookupGE :: forall k a. Enum k => k -> EnumMap k a -> Maybe (k, a)
    lookupGE k
    k = ((Int, a) -> (k, a)) -> Maybe (Int, a) -> Maybe (k, a)
    forall a b. (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap ((Int -> k) -> (Int, a) -> (k, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first Int -> k
    forall a. Enum a => Int -> a
    toEnum) (Maybe (Int, a) -> Maybe (k, a))
    -> (EnumMap k a -> Maybe (Int, a)) -> EnumMap k a -> Maybe (k, a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> IntMap a -> Maybe (Int, a)
    forall a. Int -> IntMap a -> Maybe (Int, a)
    I.lookupGE (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) (IntMap a -> Maybe (Int, a))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> Maybe (Int, a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE lookupGE #-}

    empty :: EnumMap k a
    empty :: forall k a. EnumMap k a
    empty = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a) -> IntMap a -> EnumMap k a
    forall a b. (a -> b) -> a -> b
    $ IntMap a
    forall a. IntMap a
    I.empty
    {-# INLINE empty #-}

    singleton :: (Enum k) => k -> a -> EnumMap k a
    singleton :: forall k a. Enum k => k -> a -> EnumMap k a
    singleton k
    k = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a) -> (a -> IntMap a) -> a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> a -> IntMap a
    forall a. Int -> a -> IntMap a
    I.singleton (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k)
    {-# INLINE singleton #-}

    insert :: (Enum k) => k -> a -> EnumMap k a -> EnumMap k a
    insert :: forall k a. Enum k => k -> a -> EnumMap k a -> EnumMap k a
    insert k
    k a
    a = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> a -> IntMap a -> IntMap a
    forall a. Int -> a -> IntMap a -> IntMap a
    I.insert (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) a
    a (IntMap a -> IntMap a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE insert #-}

    insertWith :: (Enum k) => (a -> a -> a) -> k -> a -> EnumMap k a -> EnumMap k a
    insertWith :: forall k a.
    Enum k =>
    (a -> a -> a) -> k -> a -> EnumMap k a -> EnumMap k a
    insertWith a -> a -> a
    f k
    k a
    a = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> a -> a) -> Int -> a -> IntMap a -> IntMap a
    forall a. (a -> a -> a) -> Int -> a -> IntMap a -> IntMap a
    I.insertWith a -> a -> a
    f (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) a
    a (IntMap a -> IntMap a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE insertWith #-}

    insertWithKey :: (Enum k)
      => (k -> a -> a -> a) -> k -> a -> EnumMap k a -> EnumMap k a
    insertWithKey :: forall k a.
    Enum k =>
    (k -> a -> a -> a) -> k -> a -> EnumMap k a -> EnumMap k a
    insertWithKey k -> a -> a -> a
    f k
    k a
    a = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int -> a -> a -> a) -> Int -> a -> IntMap a -> IntMap a
    forall a. (Int -> a -> a -> a) -> Int -> a -> IntMap a -> IntMap a
    I.insertWithKey (k -> a -> a -> a
    f (k -> a -> a -> a) -> (Int -> k) -> Int -> a -> a -> a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) a
    a (IntMap a -> IntMap a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE insertWithKey #-}

    insertLookupWithKey :: (Enum k)
      => (k -> a -> a -> a) -> k -> a -> EnumMap k a -> (Maybe a, EnumMap k a)
    insertLookupWithKey :: forall k a.
    Enum k =>
    (k -> a -> a -> a)
    -> k -> a -> EnumMap k a -> (Maybe a, EnumMap k a)
    insertLookupWithKey k -> a -> a -> a
    f k
    k a
    a =
      (IntMap a -> EnumMap k a)
    -> (Maybe a, IntMap a) -> (Maybe a, EnumMap k a)
    forall b c d. (b -> c) -> (d, b) -> (d, c)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (d, b) (d, c)
    second IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap ((Maybe a, IntMap a) -> (Maybe a, EnumMap k a))
    -> (EnumMap k a -> (Maybe a, IntMap a))
    -> EnumMap k a
    -> (Maybe a, EnumMap k a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int -> a -> a -> a) -> Int -> a -> IntMap a -> (Maybe a, IntMap a)
    forall a.
    (Int -> a -> a -> a) -> Int -> a -> IntMap a -> (Maybe a, IntMap a)
    I.insertLookupWithKey (k -> a -> a -> a
    f (k -> a -> a -> a) -> (Int -> k) -> Int -> a -> a -> a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) a
    a (IntMap a -> (Maybe a, IntMap a))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> (Maybe a, IntMap a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE insertLookupWithKey #-}

    delete :: (Enum k) => k -> EnumMap k a -> EnumMap k a
    delete :: forall k a. Enum k => k -> EnumMap k a -> EnumMap k a
    delete k
    k = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> IntMap a -> IntMap a
    forall a. Int -> IntMap a -> IntMap a
    I.delete (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) (IntMap a -> IntMap a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE delete #-}

    adjust ::  (Enum k) => (a -> a) -> k -> EnumMap k a -> EnumMap k a
    adjust :: forall k a. Enum k => (a -> a) -> k -> EnumMap k a -> EnumMap k a
    adjust a -> a
    f k
    k = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> a) -> Int -> IntMap a -> IntMap a
    forall a. (a -> a) -> Int -> IntMap a -> IntMap a
    I.adjust a -> a
    f (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) (IntMap a -> IntMap a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE adjust #-}

    adjustWithKey :: (Enum k) => (k -> a -> a) -> k -> EnumMap k a -> EnumMap k a
    adjustWithKey :: forall k a.
    Enum k =>
    (k -> a -> a) -> k -> EnumMap k a -> EnumMap k a
    adjustWithKey k -> a -> a
    f k
    k = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int -> a -> a) -> Int -> IntMap a -> IntMap a
    forall a. (Int -> a -> a) -> Int -> IntMap a -> IntMap a
    I.adjustWithKey (k -> a -> a
    f (k -> a -> a) -> (Int -> k) -> Int -> a -> a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) (IntMap a -> IntMap a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE adjustWithKey #-}

    update ::  (Enum k) => (a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a
    update :: forall k a.
    Enum k =>
    (a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a
    update a -> Maybe a
    f k
    k = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> Maybe a) -> Int -> IntMap a -> IntMap a
    forall a. (a -> Maybe a) -> Int -> IntMap a -> IntMap a
    I.update a -> Maybe a
    f (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) (IntMap a -> IntMap a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE update #-}

    updateWithKey ::  (Enum k) => (k -> a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a
    updateWithKey :: forall k a.
    Enum k =>
    (k -> a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a
    updateWithKey k -> a -> Maybe a
    f k
    k = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int -> a -> Maybe a) -> Int -> IntMap a -> IntMap a
    forall a. (Int -> a -> Maybe a) -> Int -> IntMap a -> IntMap a
    I.updateWithKey (k -> a -> Maybe a
    f (k -> a -> Maybe a) -> (Int -> k) -> Int -> a -> Maybe a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) (IntMap a -> IntMap a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE updateWithKey #-}

    updateLookupWithKey ::  (Enum k)
      => (k -> a -> Maybe a) -> k -> EnumMap k a -> (Maybe a,EnumMap k a)
    updateLookupWithKey :: forall k a.
    Enum k =>
    (k -> a -> Maybe a) -> k -> EnumMap k a -> (Maybe a, EnumMap k a)
    updateLookupWithKey k -> a -> Maybe a
    f k
    k =
      (IntMap a -> EnumMap k a)
    -> (Maybe a, IntMap a) -> (Maybe a, EnumMap k a)
    forall b c d. (b -> c) -> (d, b) -> (d, c)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (d, b) (d, c)
    second IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap ((Maybe a, IntMap a) -> (Maybe a, EnumMap k a))
    -> (EnumMap k a -> (Maybe a, IntMap a))
    -> EnumMap k a
    -> (Maybe a, EnumMap k a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int -> a -> Maybe a) -> Int -> IntMap a -> (Maybe a, IntMap a)
    forall a.
    (Int -> a -> Maybe a) -> Int -> IntMap a -> (Maybe a, IntMap a)
    I.updateLookupWithKey (k -> a -> Maybe a
    f (k -> a -> Maybe a) -> (Int -> k) -> Int -> a -> Maybe a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) (IntMap a -> (Maybe a, IntMap a))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> (Maybe a, IntMap a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE updateLookupWithKey #-}

    alter :: (Enum k) => (Maybe a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a
    alter :: forall k a.
    Enum k =>
    (Maybe a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a
    alter Maybe a -> Maybe a
    f k
    k = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Maybe a -> Maybe a) -> Int -> IntMap a -> IntMap a
    forall a. (Maybe a -> Maybe a) -> Int -> IntMap a -> IntMap a
    I.alter Maybe a -> Maybe a
    f (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) (IntMap a -> IntMap a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE alter #-}

    alterF :: (Enum k, Functor f) => (Maybe a -> f (Maybe a)) -> k -> EnumMap k a -> f (EnumMap k a)
    alterF :: forall k (f :: * -> *) a.
    (Enum k, Functor f) =>
    (Maybe a -> f (Maybe a)) -> k -> EnumMap k a -> f (EnumMap k a)
    alterF Maybe a -> f (Maybe a)
    f k
    k = (IntMap a -> EnumMap k a) -> f (IntMap a) -> f (EnumMap k a)
    forall a b. (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (f (IntMap a) -> f (EnumMap k a))
    -> (EnumMap k a -> f (IntMap a)) -> EnumMap k a -> f (EnumMap k a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Maybe a -> f (Maybe a)) -> Int -> IntMap a -> f (IntMap a)
    forall (f :: * -> *) a.
    Functor f =>
    (Maybe a -> f (Maybe a)) -> Int -> IntMap a -> f (IntMap a)
    I.alterF Maybe a -> f (Maybe a)
    f (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) (IntMap a -> f (IntMap a))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> f (IntMap a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE alterF #-}

    unions :: [EnumMap k a] -> EnumMap k a
    unions :: forall k a. [EnumMap k a] -> EnumMap k a
    unions = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> ([EnumMap k a] -> IntMap a) -> [EnumMap k a] -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . [IntMap a] -> IntMap a
    forall (f :: * -> *) a. Foldable f => f (IntMap a) -> IntMap a
    I.unions ([IntMap a] -> IntMap a)
    -> ([EnumMap k a] -> [IntMap a]) -> [EnumMap k a] -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (EnumMap k a -> IntMap a) -> [EnumMap k a] -> [IntMap a]
    forall a b. (a -> b) -> [a] -> [b]
    P.map EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE unions #-}

    unionsWith :: (a -> a -> a) -> [EnumMap k a] -> EnumMap k a
    unionsWith :: forall a k. (a -> a -> a) -> [EnumMap k a] -> EnumMap k a
    unionsWith a -> a -> a
    f = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> ([EnumMap k a] -> IntMap a) -> [EnumMap k a] -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> a -> a) -> [IntMap a] -> IntMap a
    forall (f :: * -> *) a.
    Foldable f =>
    (a -> a -> a) -> f (IntMap a) -> IntMap a
    I.unionsWith a -> a -> a
    f ([IntMap a] -> IntMap a)
    -> ([EnumMap k a] -> [IntMap a]) -> [EnumMap k a] -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (EnumMap k a -> IntMap a) -> [EnumMap k a] -> [IntMap a]
    forall a b. (a -> b) -> [a] -> [b]
    P.map EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE unionsWith #-}

    union :: EnumMap k a -> EnumMap k a -> EnumMap k a
    union :: forall k a. EnumMap k a -> EnumMap k a -> EnumMap k a
    union (EnumMap IntMap a
    im1) (EnumMap IntMap a
    im2) = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a) -> IntMap a -> EnumMap k a
    forall a b. (a -> b) -> a -> b
    $ IntMap a -> IntMap a -> IntMap a
    forall a. IntMap a -> IntMap a -> IntMap a
    I.union IntMap a
    im1 IntMap a
    im2
    {-# INLINE union #-}

    unionWith :: (a -> a -> a) -> EnumMap k a -> EnumMap k a -> EnumMap k a
    unionWith :: forall a k.
    (a -> a -> a) -> EnumMap k a -> EnumMap k a -> EnumMap k a
    unionWith a -> a -> a
    f (EnumMap IntMap a
    im1) (EnumMap IntMap a
    im2) = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a) -> IntMap a -> EnumMap k a
    forall a b. (a -> b) -> a -> b
    $ (a -> a -> a) -> IntMap a -> IntMap a -> IntMap a
    forall a. (a -> a -> a) -> IntMap a -> IntMap a -> IntMap a
    I.unionWith a -> a -> a
    f IntMap a
    im1 IntMap a
    im2
    {-# INLINE unionWith #-}

    unionWithKey :: (Enum k)
      => (k -> a -> a -> a) -> EnumMap k a -> EnumMap k a -> EnumMap k a
    unionWithKey :: forall k a.
    Enum k =>
    (k -> a -> a -> a) -> EnumMap k a -> EnumMap k a -> EnumMap k a
    unionWithKey k -> a -> a -> a
    f (EnumMap IntMap a
    im1) (EnumMap IntMap a
    im2) =
      IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a) -> IntMap a -> EnumMap k a
    forall a b. (a -> b) -> a -> b
    $ (Int -> a -> a -> a) -> IntMap a -> IntMap a -> IntMap a
    forall a. (Int -> a -> a -> a) -> IntMap a -> IntMap a -> IntMap a
    I.unionWithKey (k -> a -> a -> a
    f (k -> a -> a -> a) -> (Int -> k) -> Int -> a -> a -> a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) IntMap a
    im1 IntMap a
    im2
    {-# INLINE unionWithKey #-}

    difference :: EnumMap k a -> EnumMap k b -> EnumMap k a
    difference :: forall k a b. EnumMap k a -> EnumMap k b -> EnumMap k a
    difference (EnumMap IntMap a
    im1) (EnumMap IntMap b
    im2) = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a) -> IntMap a -> EnumMap k a
    forall a b. (a -> b) -> a -> b
    $ IntMap a -> IntMap b -> IntMap a
    forall a b. IntMap a -> IntMap b -> IntMap a
    I.difference IntMap a
    im1 IntMap b
    im2
    {-# INLINE difference #-}

    differenceWith :: (a -> b -> Maybe a) -> EnumMap k a -> EnumMap k b -> EnumMap k a
    differenceWith :: forall a b k.
    (a -> b -> Maybe a) -> EnumMap k a -> EnumMap k b -> EnumMap k a
    differenceWith a -> b -> Maybe a
    f (EnumMap IntMap a
    im1) (EnumMap IntMap b
    im2) =
      IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a) -> IntMap a -> EnumMap k a
    forall a b. (a -> b) -> a -> b
    $ (a -> b -> Maybe a) -> IntMap a -> IntMap b -> IntMap a
    forall a b. (a -> b -> Maybe a) -> IntMap a -> IntMap b -> IntMap a
    I.differenceWith a -> b -> Maybe a
    f IntMap a
    im1 IntMap b
    im2
    {-# INLINE differenceWith #-}

    differenceWithKey :: (Enum k)
      => (k -> a -> b -> Maybe a) -> EnumMap k a -> EnumMap k b -> EnumMap k a
    differenceWithKey :: forall k a b.
    Enum k =>
    (k -> a -> b -> Maybe a)
    -> EnumMap k a -> EnumMap k b -> EnumMap k a
    differenceWithKey k -> a -> b -> Maybe a
    f (EnumMap IntMap a
    im1) (EnumMap IntMap b
    im2) =
      IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a) -> IntMap a -> EnumMap k a
    forall a b. (a -> b) -> a -> b
    $ (Int -> a -> b -> Maybe a) -> IntMap a -> IntMap b -> IntMap a
    forall a b.
    (Int -> a -> b -> Maybe a) -> IntMap a -> IntMap b -> IntMap a
    I.differenceWithKey (k -> a -> b -> Maybe a
    f (k -> a -> b -> Maybe a) -> (Int -> k) -> Int -> a -> b -> Maybe a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) IntMap a
    im1 IntMap b
    im2
    {-# INLINE differenceWithKey #-}

    intersection :: EnumMap k a -> EnumMap k b -> EnumMap k a
    intersection :: forall k a b. EnumMap k a -> EnumMap k b -> EnumMap k a
    intersection (EnumMap IntMap a
    im1) (EnumMap IntMap b
    im2) = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a) -> IntMap a -> EnumMap k a
    forall a b. (a -> b) -> a -> b
    $ IntMap a -> IntMap b -> IntMap a
    forall a b. IntMap a -> IntMap b -> IntMap a
    I.intersection IntMap a
    im1 IntMap b
    im2
    {-# INLINE intersection #-}

    intersectionWith :: (a -> b -> c) -> EnumMap k a -> EnumMap k b -> EnumMap k c
    intersectionWith :: forall a b c k.
    (a -> b -> c) -> EnumMap k a -> EnumMap k b -> EnumMap k c
    intersectionWith a -> b -> c
    f (EnumMap IntMap a
    im1) (EnumMap IntMap b
    im2) =
      IntMap c -> EnumMap k c
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap c -> EnumMap k c) -> IntMap c -> EnumMap k c
    forall a b. (a -> b) -> a -> b
    $ (a -> b -> c) -> IntMap a -> IntMap b -> IntMap c
    forall a b c. (a -> b -> c) -> IntMap a -> IntMap b -> IntMap c
    I.intersectionWith a -> b -> c
    f IntMap a
    im1 IntMap b
    im2
    {-# INLINE intersectionWith #-}

    intersectionWithKey :: (Enum k)
      => (k -> a -> b -> c) -> EnumMap k a -> EnumMap k b -> EnumMap k c
    intersectionWithKey :: forall k a b c.
    Enum k =>
    (k -> a -> b -> c) -> EnumMap k a -> EnumMap k b -> EnumMap k c
    intersectionWithKey k -> a -> b -> c
    f (EnumMap IntMap a
    im1) (EnumMap IntMap b
    im2) =
      IntMap c -> EnumMap k c
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap c -> EnumMap k c) -> IntMap c -> EnumMap k c
    forall a b. (a -> b) -> a -> b
    $ (Int -> a -> b -> c) -> IntMap a -> IntMap b -> IntMap c
    forall a b c.
    (Int -> a -> b -> c) -> IntMap a -> IntMap b -> IntMap c
    I.intersectionWithKey (k -> a -> b -> c
    f (k -> a -> b -> c) -> (Int -> k) -> Int -> a -> b -> c
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) IntMap a
    im1 IntMap b
    im2
    {-# INLINE intersectionWithKey #-}

    mergeWithKey :: (Enum k)
      => (k -> a -> b -> Maybe c)
      -> (EnumMap k a -> EnumMap k c)
      -> (EnumMap k b -> EnumMap k c)
      -> EnumMap k a
      -> EnumMap k b
      -> EnumMap k c
    mergeWithKey :: forall k a b c.
    Enum k =>
    (k -> a -> b -> Maybe c)
    -> (EnumMap k a -> EnumMap k c)
    -> (EnumMap k b -> EnumMap k c)
    -> EnumMap k a
    -> EnumMap k b
    -> EnumMap k c
    mergeWithKey k -> a -> b -> Maybe c
    f EnumMap k a -> EnumMap k c
    ga EnumMap k b -> EnumMap k c
    gb = \EnumMap k a
    ma EnumMap k b
    mb -> IntMap c -> EnumMap k c
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap c -> EnumMap k c) -> IntMap c -> EnumMap k c
    forall a b. (a -> b) -> a -> b
    $
      (Int -> a -> b -> Maybe c)
    -> (IntMap a -> IntMap c)
    -> (IntMap b -> IntMap c)
    -> IntMap a
    -> IntMap b
    -> IntMap c
    forall a b c.
    (Int -> a -> b -> Maybe c)
    -> (IntMap a -> IntMap c)
    -> (IntMap b -> IntMap c)
    -> IntMap a
    -> IntMap b
    -> IntMap c
    I.mergeWithKey (k -> a -> b -> Maybe c
    f (k -> a -> b -> Maybe c) -> (Int -> k) -> Int -> a -> b -> Maybe c
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum)
                     (EnumMap k c -> IntMap c
    forall k a. EnumMap k a -> IntMap a
    unWrap (EnumMap k c -> IntMap c)
    -> (IntMap a -> EnumMap k c) -> IntMap a -> IntMap c
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> EnumMap k c
    ga (EnumMap k a -> EnumMap k c)
    -> (IntMap a -> EnumMap k a) -> IntMap a -> EnumMap k c
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap)
                     (EnumMap k c -> IntMap c
    forall k a. EnumMap k a -> IntMap a
    unWrap (EnumMap k c -> IntMap c)
    -> (IntMap b -> EnumMap k c) -> IntMap b -> IntMap c
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k b -> EnumMap k c
    gb (EnumMap k b -> EnumMap k c)
    -> (IntMap b -> EnumMap k b) -> IntMap b -> EnumMap k c
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . IntMap b -> EnumMap k b
    forall k a. IntMap a -> EnumMap k a
    EnumMap)
                     (EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap EnumMap k a
    ma)
                     (EnumMap k b -> IntMap b
    forall k a. EnumMap k a -> IntMap a
    unWrap EnumMap k b
    mb)
    {-# INLINE mergeWithKey #-}

    updateMinWithKey :: (Enum k) => (k -> a -> Maybe a) -> EnumMap k a -> EnumMap k a
    updateMinWithKey :: forall k a.
    Enum k =>
    (k -> a -> Maybe a) -> EnumMap k a -> EnumMap k a
    updateMinWithKey k -> a -> Maybe a
    f = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int -> a -> Maybe a) -> IntMap a -> IntMap a
    forall a. (Int -> a -> Maybe a) -> IntMap a -> IntMap a
    I.updateMinWithKey (k -> a -> Maybe a
    f (k -> a -> Maybe a) -> (Int -> k) -> Int -> a -> Maybe a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) (IntMap a -> IntMap a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE updateMinWithKey #-}

    updateMaxWithKey :: (Enum k) => (k -> a -> Maybe a) -> EnumMap k a -> EnumMap k a
    updateMaxWithKey :: forall k a.
    Enum k =>
    (k -> a -> Maybe a) -> EnumMap k a -> EnumMap k a
    updateMaxWithKey k -> a -> Maybe a
    f = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int -> a -> Maybe a) -> IntMap a -> IntMap a
    forall a. (Int -> a -> Maybe a) -> IntMap a -> IntMap a
    I.updateMaxWithKey (k -> a -> Maybe a
    f (k -> a -> Maybe a) -> (Int -> k) -> Int -> a -> Maybe a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) (IntMap a -> IntMap a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE updateMaxWithKey #-}

    maxViewWithKey :: (Enum k) => EnumMap k a -> Maybe ((k, a), EnumMap k a)
    maxViewWithKey :: forall k a. Enum k => EnumMap k a -> Maybe ((k, a), EnumMap k a)
    maxViewWithKey = (((Int, a), IntMap a) -> ((k, a), EnumMap k a))
    -> Maybe ((Int, a), IntMap a) -> Maybe ((k, a), EnumMap k a)
    forall a b. (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap ((Int, a), IntMap a) -> ((k, a), EnumMap k a)
    forall {a} {b} {a} {k}.
    Enum a =>
    ((Int, b), IntMap a) -> ((a, b), EnumMap k a)
    wrap (Maybe ((Int, a), IntMap a) -> Maybe ((k, a), EnumMap k a))
    -> (EnumMap k a -> Maybe ((Int, a), IntMap a))
    -> EnumMap k a
    -> Maybe ((k, a), EnumMap k a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . IntMap a -> Maybe ((Int, a), IntMap a)
    forall a. IntMap a -> Maybe ((Int, a), IntMap a)
    I.maxViewWithKey (IntMap a -> Maybe ((Int, a), IntMap a))
    -> (EnumMap k a -> IntMap a)
    -> EnumMap k a
    -> Maybe ((Int, a), IntMap a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
      where
        wrap :: ((Int, b), IntMap a) -> ((a, b), EnumMap k a)
    wrap ((Int
    i, b
    a), IntMap a
    im) = ((Int -> a
    forall a. Enum a => Int -> a
    toEnum Int
    i, b
    a), IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap IntMap a
    im)
    {-# INLINE maxViewWithKey #-}

    minViewWithKey :: (Enum k) => EnumMap k a -> Maybe ((k, a), EnumMap k a)
    minViewWithKey :: forall k a. Enum k => EnumMap k a -> Maybe ((k, a), EnumMap k a)
    minViewWithKey =  (((Int, a), IntMap a) -> ((k, a), EnumMap k a))
    -> Maybe ((Int, a), IntMap a) -> Maybe ((k, a), EnumMap k a)
    forall a b. (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap ((Int, a), IntMap a) -> ((k, a), EnumMap k a)
    forall {a} {b} {a} {k}.
    Enum a =>
    ((Int, b), IntMap a) -> ((a, b), EnumMap k a)
    wrap (Maybe ((Int, a), IntMap a) -> Maybe ((k, a), EnumMap k a))
    -> (EnumMap k a -> Maybe ((Int, a), IntMap a))
    -> EnumMap k a
    -> Maybe ((k, a), EnumMap k a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . IntMap a -> Maybe ((Int, a), IntMap a)
    forall a. IntMap a -> Maybe ((Int, a), IntMap a)
    I.minViewWithKey (IntMap a -> Maybe ((Int, a), IntMap a))
    -> (EnumMap k a -> IntMap a)
    -> EnumMap k a
    -> Maybe ((Int, a), IntMap a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
      where
        wrap :: ((Int, b), IntMap a) -> ((a, b), EnumMap k a)
    wrap ((Int
    i, b
    a), IntMap a
    imap) = ((Int -> a
    forall a. Enum a => Int -> a
    toEnum Int
    i, b
    a), IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap IntMap a
    imap)
    {-# INLINE minViewWithKey #-}

    updateMax :: (a -> Maybe a) -> EnumMap k a -> EnumMap k a
    updateMax :: forall a k. (a -> Maybe a) -> EnumMap k a -> EnumMap k a
    updateMax a -> Maybe a
    f = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> Maybe a) -> IntMap a -> IntMap a
    forall a. (a -> Maybe a) -> IntMap a -> IntMap a
    I.updateMax a -> Maybe a
    f (IntMap a -> IntMap a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE updateMax #-}

    updateMin :: (a -> Maybe a) -> EnumMap k a -> EnumMap k a
    updateMin :: forall a k. (a -> Maybe a) -> EnumMap k a -> EnumMap k a
    updateMin a -> Maybe a
    f = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> Maybe a) -> IntMap a -> IntMap a
    forall a. (a -> Maybe a) -> IntMap a -> IntMap a
    I.updateMin a -> Maybe a
    f (IntMap a -> IntMap a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE updateMin #-}

    maxView :: EnumMap k a -> Maybe (a, EnumMap k a)
    maxView :: forall k a. EnumMap k a -> Maybe (a, EnumMap k a)
    maxView = ((a, IntMap a) -> (a, EnumMap k a))
    -> Maybe (a, IntMap a) -> Maybe (a, EnumMap k a)
    forall a b. (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap ((IntMap a -> EnumMap k a) -> (a, IntMap a) -> (a, EnumMap k a)
    forall b c d. (b -> c) -> (d, b) -> (d, c)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (d, b) (d, c)
    second IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap) (Maybe (a, IntMap a) -> Maybe (a, EnumMap k a))
    -> (EnumMap k a -> Maybe (a, IntMap a))
    -> EnumMap k a
    -> Maybe (a, EnumMap k a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . IntMap a -> Maybe (a, IntMap a)
    forall a. IntMap a -> Maybe (a, IntMap a)
    I.maxView (IntMap a -> Maybe (a, IntMap a))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> Maybe (a, IntMap a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE maxView #-}

    minView :: EnumMap k a -> Maybe (a, EnumMap k a)
    minView :: forall k a. EnumMap k a -> Maybe (a, EnumMap k a)
    minView = ((a, IntMap a) -> (a, EnumMap k a))
    -> Maybe (a, IntMap a) -> Maybe (a, EnumMap k a)
    forall a b. (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap ((IntMap a -> EnumMap k a) -> (a, IntMap a) -> (a, EnumMap k a)
    forall b c d. (b -> c) -> (d, b) -> (d, c)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (d, b) (d, c)
    second IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap) (Maybe (a, IntMap a) -> Maybe (a, EnumMap k a))
    -> (EnumMap k a -> Maybe (a, IntMap a))
    -> EnumMap k a
    -> Maybe (a, EnumMap k a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . IntMap a -> Maybe (a, IntMap a)
    forall a. IntMap a -> Maybe (a, IntMap a)
    I.minView (IntMap a -> Maybe (a, IntMap a))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> Maybe (a, IntMap a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE minView #-}

    deleteFindMax :: (Enum k) => EnumMap k a -> ((k, a), EnumMap k a)
    deleteFindMax :: forall k a. Enum k => EnumMap k a -> ((k, a), EnumMap k a)
    deleteFindMax = ((Int -> k) -> (Int, a) -> (k, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first Int -> k
    forall a. Enum a => Int -> a
    toEnum ((Int, a) -> (k, a))
    -> (IntMap a -> EnumMap k a)
    -> ((Int, a), IntMap a)
    -> ((k, a), EnumMap k a)
    forall b c b' c'. (b -> c) -> (b' -> c') -> (b, b') -> (c, c')
    forall (a :: * -> * -> *) b c b' c'.
    Arrow a =>
    a b c -> a b' c' -> a (b, b') (c, c')
    *** IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap) (((Int, a), IntMap a) -> ((k, a), EnumMap k a))
    -> (EnumMap k a -> ((Int, a), IntMap a))
    -> EnumMap k a
    -> ((k, a), EnumMap k a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . IntMap a -> ((Int, a), IntMap a)
    forall a. IntMap a -> ((Int, a), IntMap a)
    I.deleteFindMax (IntMap a -> ((Int, a), IntMap a))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> ((Int, a), IntMap a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE deleteFindMax #-}

    deleteFindMin :: (Enum k) => EnumMap k a -> ((k, a), EnumMap k a)
    deleteFindMin :: forall k a. Enum k => EnumMap k a -> ((k, a), EnumMap k a)
    deleteFindMin = ((Int -> k) -> (Int, a) -> (k, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first Int -> k
    forall a. Enum a => Int -> a
    toEnum ((Int, a) -> (k, a))
    -> (IntMap a -> EnumMap k a)
    -> ((Int, a), IntMap a)
    -> ((k, a), EnumMap k a)
    forall b c b' c'. (b -> c) -> (b' -> c') -> (b, b') -> (c, c')
    forall (a :: * -> * -> *) b c b' c'.
    Arrow a =>
    a b c -> a b' c' -> a (b, b') (c, c')
    *** IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap) (((Int, a), IntMap a) -> ((k, a), EnumMap k a))
    -> (EnumMap k a -> ((Int, a), IntMap a))
    -> EnumMap k a
    -> ((k, a), EnumMap k a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . IntMap a -> ((Int, a), IntMap a)
    forall a. IntMap a -> ((Int, a), IntMap a)
    I.deleteFindMin (IntMap a -> ((Int, a), IntMap a))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> ((Int, a), IntMap a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE deleteFindMin #-}

    lookupMin :: (Enum k) => EnumMap k a -> Maybe (k, a)
    lookupMin :: forall k a. Enum k => EnumMap k a -> Maybe (k, a)
    lookupMin = ((Int, a) -> (k, a)) -> Maybe (Int, a) -> Maybe (k, a)
    forall a b. (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap ((Int -> k) -> (Int, a) -> (k, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first Int -> k
    forall a. Enum a => Int -> a
    toEnum) (Maybe (Int, a) -> Maybe (k, a))
    -> (EnumMap k a -> Maybe (Int, a)) -> EnumMap k a -> Maybe (k, a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . IntMap a -> Maybe (Int, a)
    forall a. IntMap a -> Maybe (Int, a)
    I.lookupMin (IntMap a -> Maybe (Int, a))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> Maybe (Int, a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE lookupMin #-}

    lookupMax :: (Enum k) => EnumMap k a -> Maybe (k, a)
    lookupMax :: forall k a. Enum k => EnumMap k a -> Maybe (k, a)
    lookupMax = ((Int, a) -> (k, a)) -> Maybe (Int, a) -> Maybe (k, a)
    forall a b. (a -> b) -> Maybe a -> Maybe b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap ((Int -> k) -> (Int, a) -> (k, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first Int -> k
    forall a. Enum a => Int -> a
    toEnum) (Maybe (Int, a) -> Maybe (k, a))
    -> (EnumMap k a -> Maybe (Int, a)) -> EnumMap k a -> Maybe (k, a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . IntMap a -> Maybe (Int, a)
    forall a. IntMap a -> Maybe (Int, a)
    I.lookupMax (IntMap a -> Maybe (Int, a))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> Maybe (Int, a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE lookupMax #-}

    findMin :: (Enum k) => EnumMap k a -> (k, a)
    findMin :: forall k a. Enum k => EnumMap k a -> (k, a)
    findMin = (Int -> k) -> (Int, a) -> (k, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first Int -> k
    forall a. Enum a => Int -> a
    toEnum ((Int, a) -> (k, a))
    -> (EnumMap k a -> (Int, a)) -> EnumMap k a -> (k, a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . IntMap a -> (Int, a)
    forall a. IntMap a -> (Int, a)
    I.findMin (IntMap a -> (Int, a))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> (Int, a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE findMin #-}

    findMax :: (Enum k) => EnumMap k a -> (k, a)
    findMax :: forall k a. Enum k => EnumMap k a -> (k, a)
    findMax = (Int -> k) -> (Int, a) -> (k, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first Int -> k
    forall a. Enum a => Int -> a
    toEnum ((Int, a) -> (k, a))
    -> (EnumMap k a -> (Int, a)) -> EnumMap k a -> (k, a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . IntMap a -> (Int, a)
    forall a. IntMap a -> (Int, a)
    I.findMax (IntMap a -> (Int, a))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> (Int, a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE findMax #-}

    deleteMin :: EnumMap k a -> EnumMap k a
    deleteMin :: forall k a. EnumMap k a -> EnumMap k a
    deleteMin = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . IntMap a -> IntMap a
    forall a. IntMap a -> IntMap a
    I.deleteMin (IntMap a -> IntMap a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE deleteMin #-}

    deleteMax :: EnumMap k a -> EnumMap k a
    deleteMax :: forall k a. EnumMap k a -> EnumMap k a
    deleteMax = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . IntMap a -> IntMap a
    forall a. IntMap a -> IntMap a
    I.deleteMax (IntMap a -> IntMap a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE deleteMax #-}

    isProperSubmapOf :: (Eq a) => EnumMap k a -> EnumMap k a -> Bool
    isProperSubmapOf :: forall a k. Eq a => EnumMap k a -> EnumMap k a -> Bool
    isProperSubmapOf (EnumMap IntMap a
    im1) (EnumMap IntMap a
    im2) = IntMap a -> IntMap a -> Bool
    forall a. Eq a => IntMap a -> IntMap a -> Bool
    I.isProperSubmapOf IntMap a
    im1 IntMap a
    im2
    {-# INLINE isProperSubmapOf #-}

    isProperSubmapOfBy :: (a -> b -> Bool) -> EnumMap k a -> EnumMap k b -> Bool
    isProperSubmapOfBy :: forall a b k.
    (a -> b -> Bool) -> EnumMap k a -> EnumMap k b -> Bool
    isProperSubmapOfBy a -> b -> Bool
    p (EnumMap IntMap a
    im1) (EnumMap IntMap b
    im2) = (a -> b -> Bool) -> IntMap a -> IntMap b -> Bool
    forall a b. (a -> b -> Bool) -> IntMap a -> IntMap b -> Bool
    I.isProperSubmapOfBy a -> b -> Bool
    p IntMap a
    im1 IntMap b
    im2
    {-# INLINE isProperSubmapOfBy #-}

    isSubmapOf :: Eq a => EnumMap k a -> EnumMap k a -> Bool
    isSubmapOf :: forall a k. Eq a => EnumMap k a -> EnumMap k a -> Bool
    isSubmapOf (EnumMap IntMap a
    im1) (EnumMap IntMap a
    im2) = IntMap a -> IntMap a -> Bool
    forall a. Eq a => IntMap a -> IntMap a -> Bool
    I.isSubmapOf IntMap a
    im1 IntMap a
    im2
    {-# INLINE isSubmapOf #-}

    isSubmapOfBy :: (a -> b -> Bool) -> EnumMap k a -> EnumMap k b -> Bool
    isSubmapOfBy :: forall a b k.
    (a -> b -> Bool) -> EnumMap k a -> EnumMap k b -> Bool
    isSubmapOfBy a -> b -> Bool
    p (EnumMap IntMap a
    im1) (EnumMap IntMap b
    im2) = (a -> b -> Bool) -> IntMap a -> IntMap b -> Bool
    forall a b. (a -> b -> Bool) -> IntMap a -> IntMap b -> Bool
    I.isSubmapOfBy a -> b -> Bool
    p IntMap a
    im1 IntMap b
    im2
    {-# INLINE isSubmapOfBy #-}

    map :: (a -> b) -> EnumMap k a -> EnumMap k b
    map :: forall a b k. (a -> b) -> EnumMap k a -> EnumMap k b
    map a -> b
    f = IntMap b -> EnumMap k b
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap b -> EnumMap k b)
    -> (EnumMap k a -> IntMap b) -> EnumMap k a -> EnumMap k b
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> b) -> IntMap a -> IntMap b
    forall a b. (a -> b) -> IntMap a -> IntMap b
    I.map a -> b
    f (IntMap a -> IntMap b)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap b
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE map #-}

    mapWithKey :: (Enum k) => (k -> a -> b) -> EnumMap k a -> EnumMap k b
    mapWithKey :: forall k a b. Enum k => (k -> a -> b) -> EnumMap k a -> EnumMap k b
    mapWithKey k -> a -> b
    f = IntMap b -> EnumMap k b
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap b -> EnumMap k b)
    -> (EnumMap k a -> IntMap b) -> EnumMap k a -> EnumMap k b
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int -> a -> b) -> IntMap a -> IntMap b
    forall a b. (Int -> a -> b) -> IntMap a -> IntMap b
    I.mapWithKey (k -> a -> b
    f (k -> a -> b) -> (Int -> k) -> Int -> a -> b
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) (IntMap a -> IntMap b)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap b
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE mapWithKey #-}

    traverseWithKey :: (Applicative t, Enum k)
      => (k -> a -> t b) -> EnumMap k a -> t (EnumMap k b)
    traverseWithKey :: forall (t :: * -> *) k a b.
    (Applicative t, Enum k) =>
    (k -> a -> t b) -> EnumMap k a -> t (EnumMap k b)
    traverseWithKey k -> a -> t b
    f = (IntMap b -> EnumMap k b) -> t (IntMap b) -> t (EnumMap k b)
    forall (f :: * -> *) a b. Applicative f => (a -> b) -> f a -> f b
    liftA IntMap b -> EnumMap k b
    forall k a. IntMap a -> EnumMap k a
    EnumMap (t (IntMap b) -> t (EnumMap k b))
    -> (EnumMap k a -> t (IntMap b)) -> EnumMap k a -> t (EnumMap k b)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int -> a -> t b) -> IntMap a -> t (IntMap b)
    forall (t :: * -> *) a b.
    Applicative t =>
    (Int -> a -> t b) -> IntMap a -> t (IntMap b)
    I.traverseWithKey (k -> a -> t b
    f (k -> a -> t b) -> (Int -> k) -> Int -> a -> t b
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) (IntMap a -> t (IntMap b))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> t (IntMap b)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE traverseWithKey #-}

    mapAccum :: (a -> b -> (a, c)) -> a -> EnumMap k b -> (a, EnumMap k c)
    mapAccum :: forall a b c k.
    (a -> b -> (a, c)) -> a -> EnumMap k b -> (a, EnumMap k c)
    mapAccum a -> b -> (a, c)
    f a
    a = (IntMap c -> EnumMap k c) -> (a, IntMap c) -> (a, EnumMap k c)
    forall b c d. (b -> c) -> (d, b) -> (d, c)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (d, b) (d, c)
    second IntMap c -> EnumMap k c
    forall k a. IntMap a -> EnumMap k a
    EnumMap ((a, IntMap c) -> (a, EnumMap k c))
    -> (EnumMap k b -> (a, IntMap c))
    -> EnumMap k b
    -> (a, EnumMap k c)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> b -> (a, c)) -> a -> IntMap b -> (a, IntMap c)
    forall a b c. (a -> b -> (a, c)) -> a -> IntMap b -> (a, IntMap c)
    I.mapAccum a -> b -> (a, c)
    f a
    a (IntMap b -> (a, IntMap c))
    -> (EnumMap k b -> IntMap b) -> EnumMap k b -> (a, IntMap c)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k b -> IntMap b
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE mapAccum #-}

    mapAccumWithKey :: (Enum k)
      => (a -> k -> b -> (a, c)) -> a -> EnumMap k b -> (a, EnumMap k c)
    mapAccumWithKey :: forall k a b c.
    Enum k =>
    (a -> k -> b -> (a, c)) -> a -> EnumMap k b -> (a, EnumMap k c)
    mapAccumWithKey a -> k -> b -> (a, c)
    f a
    a =
      (IntMap c -> EnumMap k c) -> (a, IntMap c) -> (a, EnumMap k c)
    forall b c d. (b -> c) -> (d, b) -> (d, c)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (d, b) (d, c)
    second IntMap c -> EnumMap k c
    forall k a. IntMap a -> EnumMap k a
    EnumMap ((a, IntMap c) -> (a, EnumMap k c))
    -> (EnumMap k b -> (a, IntMap c))
    -> EnumMap k b
    -> (a, EnumMap k c)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> Int -> b -> (a, c)) -> a -> IntMap b -> (a, IntMap c)
    forall a b c.
    (a -> Int -> b -> (a, c)) -> a -> IntMap b -> (a, IntMap c)
    I.mapAccumWithKey (\a
    b -> a -> k -> b -> (a, c)
    f a
    b (k -> b -> (a, c)) -> (Int -> k) -> Int -> b -> (a, c)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) a
    a (IntMap b -> (a, IntMap c))
    -> (EnumMap k b -> IntMap b) -> EnumMap k b -> (a, IntMap c)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k b -> IntMap b
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE mapAccumWithKey #-}

    mapAccumRWithKey :: (Enum k)
      => (a -> k -> b -> (a, c)) -> a -> EnumMap k b -> (a, EnumMap k c)
    mapAccumRWithKey :: forall k a b c.
    Enum k =>
    (a -> k -> b -> (a, c)) -> a -> EnumMap k b -> (a, EnumMap k c)
    mapAccumRWithKey a -> k -> b -> (a, c)
    f a
    a =
      (IntMap c -> EnumMap k c) -> (a, IntMap c) -> (a, EnumMap k c)
    forall b c d. (b -> c) -> (d, b) -> (d, c)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (d, b) (d, c)
    second IntMap c -> EnumMap k c
    forall k a. IntMap a -> EnumMap k a
    EnumMap ((a, IntMap c) -> (a, EnumMap k c))
    -> (EnumMap k b -> (a, IntMap c))
    -> EnumMap k b
    -> (a, EnumMap k c)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> Int -> b -> (a, c)) -> a -> IntMap b -> (a, IntMap c)
    forall a b c.
    (a -> Int -> b -> (a, c)) -> a -> IntMap b -> (a, IntMap c)
    I.mapAccumRWithKey (\a
    b -> a -> k -> b -> (a, c)
    f a
    b (k -> b -> (a, c)) -> (Int -> k) -> Int -> b -> (a, c)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) a
    a (IntMap b -> (a, IntMap c))
    -> (EnumMap k b -> IntMap b) -> EnumMap k b -> (a, IntMap c)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k b -> IntMap b
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE mapAccumRWithKey #-}

    mapKeys :: (Enum k) => (k -> k) -> EnumMap k a -> EnumMap k a
    mapKeys :: forall k a. Enum k => (k -> k) -> EnumMap k a -> EnumMap k a
    mapKeys k -> k
    f = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int -> Int) -> IntMap a -> IntMap a
    forall a. (Int -> Int) -> IntMap a -> IntMap a
    I.mapKeys (k -> Int
    forall a. Enum a => a -> Int
    fromEnum (k -> Int) -> (Int -> k) -> Int -> Int
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . k -> k
    f (k -> k) -> (Int -> k) -> Int -> k
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) (IntMap a -> IntMap a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE mapKeys #-}

    mapKeysWith :: (Enum k) => (a -> a -> a) -> (k -> k) -> EnumMap k a -> EnumMap k a
    mapKeysWith :: forall k a.
    Enum k =>
    (a -> a -> a) -> (k -> k) -> EnumMap k a -> EnumMap k a
    mapKeysWith a -> a -> a
    f k -> k
    g = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> a -> a) -> (Int -> Int) -> IntMap a -> IntMap a
    forall a. (a -> a -> a) -> (Int -> Int) -> IntMap a -> IntMap a
    I.mapKeysWith a -> a -> a
    f (k -> Int
    forall a. Enum a => a -> Int
    fromEnum (k -> Int) -> (Int -> k) -> Int -> Int
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . k -> k
    g (k -> k) -> (Int -> k) -> Int -> k
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) (IntMap a -> IntMap a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE mapKeysWith #-}

    mapKeysMonotonic :: (Enum k) => (k -> k) -> EnumMap k a -> EnumMap k a
    mapKeysMonotonic :: forall k a. Enum k => (k -> k) -> EnumMap k a -> EnumMap k a
    mapKeysMonotonic k -> k
    f = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int -> Int) -> IntMap a -> IntMap a
    forall a. (Int -> Int) -> IntMap a -> IntMap a
    I.mapKeysMonotonic (k -> Int
    forall a. Enum a => a -> Int
    fromEnum (k -> Int) -> (Int -> k) -> Int -> Int
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . k -> k
    f (k -> k) -> (Int -> k) -> Int -> k
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) (IntMap a -> IntMap a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE mapKeysMonotonic #-}

    filter :: (a -> Bool) -> EnumMap k a -> EnumMap k a
    filter :: forall a k. (a -> Bool) -> EnumMap k a -> EnumMap k a
    filter a -> Bool
    p = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> Bool) -> IntMap a -> IntMap a
    forall a. (a -> Bool) -> IntMap a -> IntMap a
    I.filter a -> Bool
    p (IntMap a -> IntMap a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE filter #-}

    filterWithKey :: (Enum k) => (k -> a -> Bool) -> EnumMap k a -> EnumMap k a
    filterWithKey :: forall k a.
    Enum k =>
    (k -> a -> Bool) -> EnumMap k a -> EnumMap k a
    filterWithKey k -> a -> Bool
    p = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int -> a -> Bool) -> IntMap a -> IntMap a
    forall a. (Int -> a -> Bool) -> IntMap a -> IntMap a
    I.filterWithKey (k -> a -> Bool
    p (k -> a -> Bool) -> (Int -> k) -> Int -> a -> Bool
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) (IntMap a -> IntMap a)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE filterWithKey #-}

    #if (MIN_VERSION_containers(0,5,8))
    restrictKeys :: (Enum k) => EnumMap k a -> EnumSet k -> EnumMap k a
    restrictKeys :: forall k a. Enum k => EnumMap k a -> EnumSet k -> EnumMap k a
    restrictKeys EnumMap k a
    m EnumSet k
    s =
      IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a) -> IntMap a -> EnumMap k a
    forall a b. (a -> b) -> a -> b
    $ IntMap a -> IntSet -> IntMap a
    forall a. IntMap a -> IntSet -> IntMap a
    I.restrictKeys (EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap EnumMap k a
    m) (EnumSet k -> IntSet
    forall k. EnumSet k -> IntSet
    EnumSet.enumSetToIntSet EnumSet k
    s)
    {-# INLINE restrictKeys #-}

    withoutKeys :: (Enum k) => EnumMap k a -> EnumSet k -> EnumMap k a
    withoutKeys :: forall k a. Enum k => EnumMap k a -> EnumSet k -> EnumMap k a
    withoutKeys EnumMap k a
    m EnumSet k
    s =
      IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a) -> IntMap a -> EnumMap k a
    forall a b. (a -> b) -> a -> b
    $ IntMap a -> IntSet -> IntMap a
    forall a. IntMap a -> IntSet -> IntMap a
    I.withoutKeys (EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap EnumMap k a
    m) (EnumSet k -> IntSet
    forall k. EnumSet k -> IntSet
    EnumSet.enumSetToIntSet EnumSet k
    s)
    {-# INLINE withoutKeys #-}
    #endif

    partition :: (a -> Bool) -> EnumMap k a -> (EnumMap k a, EnumMap k a)
    partition :: forall a k.
    (a -> Bool) -> EnumMap k a -> (EnumMap k a, EnumMap k a)
    partition a -> Bool
    p = (IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (IntMap a -> EnumMap k a)
    -> (IntMap a, IntMap a)
    -> (EnumMap k a, EnumMap k a)
    forall b c b' c'. (b -> c) -> (b' -> c') -> (b, b') -> (c, c')
    forall (a :: * -> * -> *) b c b' c'.
    Arrow a =>
    a b c -> a b' c' -> a (b, b') (c, c')
    *** IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap) ((IntMap a, IntMap a) -> (EnumMap k a, EnumMap k a))
    -> (EnumMap k a -> (IntMap a, IntMap a))
    -> EnumMap k a
    -> (EnumMap k a, EnumMap k a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> Bool) -> IntMap a -> (IntMap a, IntMap a)
    forall a. (a -> Bool) -> IntMap a -> (IntMap a, IntMap a)
    I.partition a -> Bool
    p (IntMap a -> (IntMap a, IntMap a))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> (IntMap a, IntMap a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE partition #-}

    partitionWithKey :: (Enum k)
       => (k -> a -> Bool) -> EnumMap k a -> (EnumMap k a, EnumMap k a)
    partitionWithKey :: forall k a.
    Enum k =>
    (k -> a -> Bool) -> EnumMap k a -> (EnumMap k a, EnumMap k a)
    partitionWithKey k -> a -> Bool
    p =
      (IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (IntMap a -> EnumMap k a)
    -> (IntMap a, IntMap a)
    -> (EnumMap k a, EnumMap k a)
    forall b c b' c'. (b -> c) -> (b' -> c') -> (b, b') -> (c, c')
    forall (a :: * -> * -> *) b c b' c'.
    Arrow a =>
    a b c -> a b' c' -> a (b, b') (c, c')
    *** IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap) ((IntMap a, IntMap a) -> (EnumMap k a, EnumMap k a))
    -> (EnumMap k a -> (IntMap a, IntMap a))
    -> EnumMap k a
    -> (EnumMap k a, EnumMap k a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int -> a -> Bool) -> IntMap a -> (IntMap a, IntMap a)
    forall a. (Int -> a -> Bool) -> IntMap a -> (IntMap a, IntMap a)
    I.partitionWithKey (k -> a -> Bool
    p (k -> a -> Bool) -> (Int -> k) -> Int -> a -> Bool
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) (IntMap a -> (IntMap a, IntMap a))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> (IntMap a, IntMap a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE partitionWithKey #-}

    mapMaybe :: (a -> Maybe b) -> EnumMap k a -> EnumMap k b
    mapMaybe :: forall a b k. (a -> Maybe b) -> EnumMap k a -> EnumMap k b
    mapMaybe a -> Maybe b
    f = IntMap b -> EnumMap k b
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap b -> EnumMap k b)
    -> (EnumMap k a -> IntMap b) -> EnumMap k a -> EnumMap k b
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> Maybe b) -> IntMap a -> IntMap b
    forall a b. (a -> Maybe b) -> IntMap a -> IntMap b
    I.mapMaybe a -> Maybe b
    f (IntMap a -> IntMap b)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap b
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE mapMaybe #-}

    mapMaybeWithKey :: (Enum k) => (k -> a -> Maybe b) -> EnumMap k a -> EnumMap k b
    mapMaybeWithKey :: forall k a b.
    Enum k =>
    (k -> a -> Maybe b) -> EnumMap k a -> EnumMap k b
    mapMaybeWithKey k -> a -> Maybe b
    f = IntMap b -> EnumMap k b
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap b -> EnumMap k b)
    -> (EnumMap k a -> IntMap b) -> EnumMap k a -> EnumMap k b
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int -> a -> Maybe b) -> IntMap a -> IntMap b
    forall a b. (Int -> a -> Maybe b) -> IntMap a -> IntMap b
    I.mapMaybeWithKey (k -> a -> Maybe b
    f (k -> a -> Maybe b) -> (Int -> k) -> Int -> a -> Maybe b
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) (IntMap a -> IntMap b)
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> IntMap b
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE mapMaybeWithKey #-}

    mapEither :: (a -> Either b c) -> EnumMap k a -> (EnumMap k b, EnumMap k c)
    mapEither :: forall a b c k.
    (a -> Either b c) -> EnumMap k a -> (EnumMap k b, EnumMap k c)
    mapEither a -> Either b c
    f = (IntMap b -> EnumMap k b
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap b -> EnumMap k b)
    -> (IntMap c -> EnumMap k c)
    -> (IntMap b, IntMap c)
    -> (EnumMap k b, EnumMap k c)
    forall b c b' c'. (b -> c) -> (b' -> c') -> (b, b') -> (c, c')
    forall (a :: * -> * -> *) b c b' c'.
    Arrow a =>
    a b c -> a b' c' -> a (b, b') (c, c')
    *** IntMap c -> EnumMap k c
    forall k a. IntMap a -> EnumMap k a
    EnumMap) ((IntMap b, IntMap c) -> (EnumMap k b, EnumMap k c))
    -> (EnumMap k a -> (IntMap b, IntMap c))
    -> EnumMap k a
    -> (EnumMap k b, EnumMap k c)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> Either b c) -> IntMap a -> (IntMap b, IntMap c)
    forall a b c. (a -> Either b c) -> IntMap a -> (IntMap b, IntMap c)
    I.mapEither a -> Either b c
    f (IntMap a -> (IntMap b, IntMap c))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> (IntMap b, IntMap c)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE mapEither #-}

    mapEitherWithKey :: (Enum k)
      => (k -> a -> Either b c) -> EnumMap k a -> (EnumMap k b, EnumMap k c)
    mapEitherWithKey :: forall k a b c.
    Enum k =>
    (k -> a -> Either b c) -> EnumMap k a -> (EnumMap k b, EnumMap k c)
    mapEitherWithKey k -> a -> Either b c
    f =
      (IntMap b -> EnumMap k b
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap b -> EnumMap k b)
    -> (IntMap c -> EnumMap k c)
    -> (IntMap b, IntMap c)
    -> (EnumMap k b, EnumMap k c)
    forall b c b' c'. (b -> c) -> (b' -> c') -> (b, b') -> (c, c')
    forall (a :: * -> * -> *) b c b' c'.
    Arrow a =>
    a b c -> a b' c' -> a (b, b') (c, c')
    *** IntMap c -> EnumMap k c
    forall k a. IntMap a -> EnumMap k a
    EnumMap) ((IntMap b, IntMap c) -> (EnumMap k b, EnumMap k c))
    -> (EnumMap k a -> (IntMap b, IntMap c))
    -> EnumMap k a
    -> (EnumMap k b, EnumMap k c)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int -> a -> Either b c) -> IntMap a -> (IntMap b, IntMap c)
    forall a b c.
    (Int -> a -> Either b c) -> IntMap a -> (IntMap b, IntMap c)
    I.mapEitherWithKey (k -> a -> Either b c
    f (k -> a -> Either b c) -> (Int -> k) -> Int -> a -> Either b c
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) (IntMap a -> (IntMap b, IntMap c))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> (IntMap b, IntMap c)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE mapEitherWithKey #-}

    split :: (Enum k) => k -> EnumMap k a -> (EnumMap k a, EnumMap k a)
    split :: forall k a.
    Enum k =>
    k -> EnumMap k a -> (EnumMap k a, EnumMap k a)
    split k
    k = (IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (IntMap a -> EnumMap k a)
    -> (IntMap a, IntMap a)
    -> (EnumMap k a, EnumMap k a)
    forall b c b' c'. (b -> c) -> (b' -> c') -> (b, b') -> (c, c')
    forall (a :: * -> * -> *) b c b' c'.
    Arrow a =>
    a b c -> a b' c' -> a (b, b') (c, c')
    *** IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap) ((IntMap a, IntMap a) -> (EnumMap k a, EnumMap k a))
    -> (EnumMap k a -> (IntMap a, IntMap a))
    -> EnumMap k a
    -> (EnumMap k a, EnumMap k a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> IntMap a -> (IntMap a, IntMap a)
    forall a. Int -> IntMap a -> (IntMap a, IntMap a)
    I.split (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) (IntMap a -> (IntMap a, IntMap a))
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> (IntMap a, IntMap a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE split #-}

    splitLookup :: (Enum k) => k -> EnumMap k a -> (EnumMap k a, Maybe a, EnumMap k a)
    splitLookup :: forall k a.
    Enum k =>
    k -> EnumMap k a -> (EnumMap k a, Maybe a, EnumMap k a)
    splitLookup k
    k = (IntMap a, Maybe a, IntMap a)
    -> (EnumMap k a, Maybe a, EnumMap k a)
    forall {a} {b} {a} {k} {k}.
    (IntMap a, b, IntMap a) -> (EnumMap k a, b, EnumMap k a)
    wrap ((IntMap a, Maybe a, IntMap a)
     -> (EnumMap k a, Maybe a, EnumMap k a))
    -> (EnumMap k a -> (IntMap a, Maybe a, IntMap a))
    -> EnumMap k a
    -> (EnumMap k a, Maybe a, EnumMap k a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> IntMap a -> (IntMap a, Maybe a, IntMap a)
    forall a. Int -> IntMap a -> (IntMap a, Maybe a, IntMap a)
    I.splitLookup (k -> Int
    forall a. Enum a => a -> Int
    fromEnum k
    k) (IntMap a -> (IntMap a, Maybe a, IntMap a))
    -> (EnumMap k a -> IntMap a)
    -> EnumMap k a
    -> (IntMap a, Maybe a, IntMap a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
      where
        wrap :: (IntMap a, b, IntMap a) -> (EnumMap k a, b, EnumMap k a)
    wrap (IntMap a
    im1, b
    ma, IntMap a
    im2) = (IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap IntMap a
    im1, b
    ma, IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap IntMap a
    im2)
    {-# INLINE splitLookup #-}

    foldr :: (a -> b -> b) -> b -> EnumMap k a -> b
    foldr :: forall a b k. (a -> b -> b) -> b -> EnumMap k a -> b
    foldr a -> b -> b
    f b
    a = (a -> b -> b) -> b -> IntMap a -> b
    forall a b. (a -> b -> b) -> b -> IntMap a -> b
    I.foldr a -> b -> b
    f b
    a (IntMap a -> b) -> (EnumMap k a -> IntMap a) -> EnumMap k a -> b
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE foldr #-}

    foldl :: (a -> b -> a) -> a -> EnumMap k b -> a
    foldl :: forall a b k. (a -> b -> a) -> a -> EnumMap k b -> a
    foldl a -> b -> a
    f a
    a = (a -> b -> a) -> a -> IntMap b -> a
    forall a b. (a -> b -> a) -> a -> IntMap b -> a
    I.foldl a -> b -> a
    f a
    a (IntMap b -> a) -> (EnumMap k b -> IntMap b) -> EnumMap k b -> a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k b -> IntMap b
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE foldl #-}

    foldrWithKey :: (Enum k) => (k -> a -> b -> b) -> b -> EnumMap k a -> b
    foldrWithKey :: forall k a b. Enum k => (k -> a -> b -> b) -> b -> EnumMap k a -> b
    foldrWithKey k -> a -> b -> b
    f b
    a = (Int -> a -> b -> b) -> b -> IntMap a -> b
    forall a b. (Int -> a -> b -> b) -> b -> IntMap a -> b
    I.foldrWithKey (k -> a -> b -> b
    f (k -> a -> b -> b) -> (Int -> k) -> Int -> a -> b -> b
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) b
    a (IntMap a -> b) -> (EnumMap k a -> IntMap a) -> EnumMap k a -> b
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE foldrWithKey #-}

    foldlWithKey :: (Enum k) => (a -> k -> b -> a) -> a -> EnumMap k b -> a
    foldlWithKey :: forall k a b. Enum k => (a -> k -> b -> a) -> a -> EnumMap k b -> a
    foldlWithKey a -> k -> b -> a
    f a
    a = (a -> Int -> b -> a) -> a -> IntMap b -> a
    forall a b. (a -> Int -> b -> a) -> a -> IntMap b -> a
    I.foldlWithKey (\a
    a' -> a -> k -> b -> a
    f a
    a' (k -> b -> a) -> (Int -> k) -> Int -> b -> a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) a
    a (IntMap b -> a) -> (EnumMap k b -> IntMap b) -> EnumMap k b -> a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k b -> IntMap b
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE foldlWithKey #-}

    foldr' :: (a -> b -> b) -> b -> EnumMap k a -> b
    foldr' :: forall a b k. (a -> b -> b) -> b -> EnumMap k a -> b
    foldr' a -> b -> b
    f b
    a = (a -> b -> b) -> b -> IntMap a -> b
    forall a b. (a -> b -> b) -> b -> IntMap a -> b
    I.foldr' a -> b -> b
    f b
    a (IntMap a -> b) -> (EnumMap k a -> IntMap a) -> EnumMap k a -> b
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE foldr' #-}

    foldl' :: (a -> b -> a) -> a -> EnumMap k b -> a
    foldl' :: forall a b k. (a -> b -> a) -> a -> EnumMap k b -> a
    foldl' a -> b -> a
    f a
    a = (a -> b -> a) -> a -> IntMap b -> a
    forall a b. (a -> b -> a) -> a -> IntMap b -> a
    I.foldl' a -> b -> a
    f a
    a (IntMap b -> a) -> (EnumMap k b -> IntMap b) -> EnumMap k b -> a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k b -> IntMap b
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE foldl' #-}

    foldrWithKey' :: (Enum k) => (k -> a -> b -> b) -> b -> EnumMap k a -> b
    foldrWithKey' :: forall k a b. Enum k => (k -> a -> b -> b) -> b -> EnumMap k a -> b
    foldrWithKey' k -> a -> b -> b
    f b
    a = (Int -> a -> b -> b) -> b -> IntMap a -> b
    forall a b. (Int -> a -> b -> b) -> b -> IntMap a -> b
    I.foldrWithKey' (k -> a -> b -> b
    f (k -> a -> b -> b) -> (Int -> k) -> Int -> a -> b -> b
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) b
    a (IntMap a -> b) -> (EnumMap k a -> IntMap a) -> EnumMap k a -> b
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE foldrWithKey' #-}

    foldlWithKey' :: (Enum k) => (a -> k -> b -> a) -> a -> EnumMap k b -> a
    foldlWithKey' :: forall k a b. Enum k => (a -> k -> b -> a) -> a -> EnumMap k b -> a
    foldlWithKey' a -> k -> b -> a
    f a
    a = (a -> Int -> b -> a) -> a -> IntMap b -> a
    forall a b. (a -> Int -> b -> a) -> a -> IntMap b -> a
    I.foldlWithKey' (\a
    a' -> a -> k -> b -> a
    f a
    a' (k -> b -> a) -> (Int -> k) -> Int -> b -> a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) a
    a (IntMap b -> a) -> (EnumMap k b -> IntMap b) -> EnumMap k b -> a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k b -> IntMap b
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE foldlWithKey' #-}

    elems :: EnumMap k a -> [a]
    elems :: forall k a. EnumMap k a -> [a]
    elems = IntMap a -> [a]
    forall a. IntMap a -> [a]
    I.elems (IntMap a -> [a])
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> [a]
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE elems #-}

    keys :: (Enum k) => EnumMap k a -> [k]
    keys :: forall k a. Enum k => EnumMap k a -> [k]
    keys = (Int -> k) -> [Int] -> [k]
    forall a b. (a -> b) -> [a] -> [b]
    P.map Int -> k
    forall a. Enum a => Int -> a
    toEnum ([Int] -> [k]) -> (EnumMap k a -> [Int]) -> EnumMap k a -> [k]
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . IntMap a -> [Int]
    forall a. IntMap a -> [Int]
    I.keys (IntMap a -> [Int])
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> [Int]
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE keys #-}

    keysSet :: (Enum k) => EnumMap k a -> EnumSet k
    keysSet :: forall k a. Enum k => EnumMap k a -> EnumSet k
    keysSet = [k] -> EnumSet k
    forall k. Enum k => [k] -> EnumSet k
    EnumSet.fromDistinctAscList ([k] -> EnumSet k)
    -> (EnumMap k a -> [k]) -> EnumMap k a -> EnumSet k
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> [k]
    forall k a. Enum k => EnumMap k a -> [k]
    keys
    {-# INLINE keysSet #-}

    fromSet :: (Enum k) => (k -> a) -> EnumSet k -> EnumMap k a
    fromSet :: forall k a. Enum k => (k -> a) -> EnumSet k -> EnumMap k a
    fromSet k -> a
    f = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> (EnumSet k -> IntMap a) -> EnumSet k -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int -> a) -> IntSet -> IntMap a
    forall a. (Int -> a) -> IntSet -> IntMap a
    I.fromSet (k -> a
    f (k -> a) -> (Int -> k) -> Int -> a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) (IntSet -> IntMap a)
    -> (EnumSet k -> IntSet) -> EnumSet k -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumSet k -> IntSet
    forall k. EnumSet k -> IntSet
    EnumSet.enumSetToIntSet
    {-# INLINE fromSet #-}

    assocs :: (Enum k) => EnumMap k a -> [(k, a)]
    assocs :: forall k a. Enum k => EnumMap k a -> [(k, a)]
    assocs = ((Int, a) -> (k, a)) -> [(Int, a)] -> [(k, a)]
    forall a b. (a -> b) -> [a] -> [b]
    P.map ((Int -> k) -> (Int, a) -> (k, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first Int -> k
    forall a. Enum a => Int -> a
    toEnum) ([(Int, a)] -> [(k, a)])
    -> (EnumMap k a -> [(Int, a)]) -> EnumMap k a -> [(k, a)]
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . IntMap a -> [(Int, a)]
    forall a. IntMap a -> [(Int, a)]
    I.assocs (IntMap a -> [(Int, a)])
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> [(Int, a)]
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE assocs #-}

    toList :: (Enum k) => EnumMap k a -> [(k, a)]
    toList :: forall k a. Enum k => EnumMap k a -> [(k, a)]
    toList = EnumMap k a -> [(k, a)]
    EnumMap k a -> [Item (EnumMap k a)]
    forall l. IsList l => l -> [Item l]
    IL.toList
    {-# INLINE toList #-}

    toAscList :: (Enum k) => EnumMap k a -> [(k, a)]
    toAscList :: forall k a. Enum k => EnumMap k a -> [(k, a)]
    toAscList = ((Int, a) -> (k, a)) -> [(Int, a)] -> [(k, a)]
    forall a b. (a -> b) -> [a] -> [b]
    P.map ((Int -> k) -> (Int, a) -> (k, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first Int -> k
    forall a. Enum a => Int -> a
    toEnum) ([(Int, a)] -> [(k, a)])
    -> (EnumMap k a -> [(Int, a)]) -> EnumMap k a -> [(k, a)]
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . IntMap a -> [(Int, a)]
    forall a. IntMap a -> [(Int, a)]
    I.toAscList (IntMap a -> [(Int, a)])
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> [(Int, a)]
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE toAscList #-}

    toDescList :: (Enum k) => EnumMap k a -> [(k, a)]
    toDescList :: forall k a. Enum k => EnumMap k a -> [(k, a)]
    toDescList = ((Int, a) -> (k, a)) -> [(Int, a)] -> [(k, a)]
    forall a b. (a -> b) -> [a] -> [b]
    P.map ((Int -> k) -> (Int, a) -> (k, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first Int -> k
    forall a. Enum a => Int -> a
    toEnum) ([(Int, a)] -> [(k, a)])
    -> (EnumMap k a -> [(Int, a)]) -> EnumMap k a -> [(k, a)]
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . IntMap a -> [(Int, a)]
    forall a. IntMap a -> [(Int, a)]
    I.toDescList (IntMap a -> [(Int, a)])
    -> (EnumMap k a -> IntMap a) -> EnumMap k a -> [(Int, a)]
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . EnumMap k a -> IntMap a
    forall k a. EnumMap k a -> IntMap a
    unWrap
    {-# INLINE toDescList #-}

    fromList :: (Enum k) => [(k, a)] -> EnumMap k a
    fromList :: forall k a. Enum k => [(k, a)] -> EnumMap k a
    fromList = [(k, a)] -> EnumMap k a
    [Item (EnumMap k a)] -> EnumMap k a
    forall l. IsList l => [Item l] -> l
    IL.fromList
    {-# INLINE fromList #-}

    fromListWith :: (Enum k) => (a -> a -> a) -> [(k, a)] -> EnumMap k a
    fromListWith :: forall k a. Enum k => (a -> a -> a) -> [(k, a)] -> EnumMap k a
    fromListWith a -> a -> a
    f = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> ([(k, a)] -> IntMap a) -> [(k, a)] -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> a -> a) -> [(Int, a)] -> IntMap a
    forall a. (a -> a -> a) -> [(Int, a)] -> IntMap a
    I.fromListWith a -> a -> a
    f ([(Int, a)] -> IntMap a)
    -> ([(k, a)] -> [(Int, a)]) -> [(k, a)] -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ((k, a) -> (Int, a)) -> [(k, a)] -> [(Int, a)]
    forall a b. (a -> b) -> [a] -> [b]
    P.map ((k -> Int) -> (k, a) -> (Int, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first k -> Int
    forall a. Enum a => a -> Int
    fromEnum)
    {-# INLINE fromListWith #-}

    fromListWithKey :: (Enum k) => (k -> a -> a -> a) -> [(k, a)] -> EnumMap k a
    fromListWithKey :: forall k a. Enum k => (k -> a -> a -> a) -> [(k, a)] -> EnumMap k a
    fromListWithKey k -> a -> a -> a
    f =
      IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> ([(k, a)] -> IntMap a) -> [(k, a)] -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int -> a -> a -> a) -> [(Int, a)] -> IntMap a
    forall a. (Int -> a -> a -> a) -> [(Int, a)] -> IntMap a
    I.fromListWithKey (k -> a -> a -> a
    f (k -> a -> a -> a) -> (Int -> k) -> Int -> a -> a -> a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) ([(Int, a)] -> IntMap a)
    -> ([(k, a)] -> [(Int, a)]) -> [(k, a)] -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ((k, a) -> (Int, a)) -> [(k, a)] -> [(Int, a)]
    forall a b. (a -> b) -> [a] -> [b]
    P.map ((k -> Int) -> (k, a) -> (Int, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first k -> Int
    forall a. Enum a => a -> Int
    fromEnum)
    {-# INLINE fromListWithKey #-}

    fromAscList :: (Enum k) => [(k, a)] -> EnumMap k a
    fromAscList :: forall k a. Enum k => [(k, a)] -> EnumMap k a
    fromAscList = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> ([(k, a)] -> IntMap a) -> [(k, a)] -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . [(Int, a)] -> IntMap a
    forall a. [(Int, a)] -> IntMap a
    I.fromAscList ([(Int, a)] -> IntMap a)
    -> ([(k, a)] -> [(Int, a)]) -> [(k, a)] -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ((k, a) -> (Int, a)) -> [(k, a)] -> [(Int, a)]
    forall a b. (a -> b) -> [a] -> [b]
    P.map ((k -> Int) -> (k, a) -> (Int, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first k -> Int
    forall a. Enum a => a -> Int
    fromEnum)
    {-# INLINE fromAscList #-}

    fromAscListWith :: (Enum k) => (a -> a -> a) -> [(k, a)] -> EnumMap k a
    fromAscListWith :: forall k a. Enum k => (a -> a -> a) -> [(k, a)] -> EnumMap k a
    fromAscListWith a -> a -> a
    f = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> ([(k, a)] -> IntMap a) -> [(k, a)] -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> a -> a) -> [(Int, a)] -> IntMap a
    forall a. (a -> a -> a) -> [(Int, a)] -> IntMap a
    I.fromAscListWith a -> a -> a
    f ([(Int, a)] -> IntMap a)
    -> ([(k, a)] -> [(Int, a)]) -> [(k, a)] -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ((k, a) -> (Int, a)) -> [(k, a)] -> [(Int, a)]
    forall a b. (a -> b) -> [a] -> [b]
    P.map ((k -> Int) -> (k, a) -> (Int, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first k -> Int
    forall a. Enum a => a -> Int
    fromEnum)
    {-# INLINE fromAscListWith #-}

    fromAscListWithKey :: (Enum k) => (k -> a -> a -> a) -> [(k, a)] -> EnumMap k a
    fromAscListWithKey :: forall k a. Enum k => (k -> a -> a -> a) -> [(k, a)] -> EnumMap k a
    fromAscListWithKey k -> a -> a -> a
    f =
      IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> ([(k, a)] -> IntMap a) -> [(k, a)] -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int -> a -> a -> a) -> [(Int, a)] -> IntMap a
    forall a. (Int -> a -> a -> a) -> [(Int, a)] -> IntMap a
    I.fromAscListWithKey (k -> a -> a -> a
    f (k -> a -> a -> a) -> (Int -> k) -> Int -> a -> a -> a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> k
    forall a. Enum a => Int -> a
    toEnum) ([(Int, a)] -> IntMap a)
    -> ([(k, a)] -> [(Int, a)]) -> [(k, a)] -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ((k, a) -> (Int, a)) -> [(k, a)] -> [(Int, a)]
    forall a b. (a -> b) -> [a] -> [b]
    P.map ((k -> Int) -> (k, a) -> (Int, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first k -> Int
    forall a. Enum a => a -> Int
    fromEnum)
    {-# INLINE fromAscListWithKey #-}

    fromDistinctAscList :: (Enum k) => [(k, a)] -> EnumMap k a
    fromDistinctAscList :: forall k a. Enum k => [(k, a)] -> EnumMap k a
    fromDistinctAscList = IntMap a -> EnumMap k a
    forall k a. IntMap a -> EnumMap k a
    EnumMap (IntMap a -> EnumMap k a)
    -> ([(k, a)] -> IntMap a) -> [(k, a)] -> EnumMap k a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . [(Int, a)] -> IntMap a
    forall a. [(Int, a)] -> IntMap a
    I.fromDistinctAscList ([(Int, a)] -> IntMap a)
    -> ([(k, a)] -> [(Int, a)]) -> [(k, a)] -> IntMap a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ((k, a) -> (Int, a)) -> [(k, a)] -> [(Int, a)]
    forall a b. (a -> b) -> [a] -> [b]
    P.map ((k -> Int) -> (k, a) -> (Int, a)
    forall b c d. (b -> c) -> (b, d) -> (c, d)
    forall (a :: * -> * -> *) b c d.
    Arrow a =>
    a b c -> a (b, d) (c, d)
    first k -> Int
    forall a. Enum a => a -> Int
    fromEnum)
    {-# INLINE fromDistinctAscList #-}