    -- Note that all these extensions are only needed for @Whoops@ & Co
    -- and only as long as "Utils.Containers.Internal.TypeError"
    -- is not exposed in the containers package
    -- (see https://github.com/haskell/containers/issues/586).
    {-# LANGUAGE CPP, DataKinds, FlexibleContexts, FlexibleInstances,
                 KindSignatures, TypeFamilies, UndecidableInstances #-}
    -- |
    -- 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

    -- This is a simple wrapper for 'Data.IntMap' that works with any type of keys
    -- that are instances of 'Enum' type class.  For documentation please see the
    -- one for 'Data.IntMap'.

    module Data.EnumMap
      ( module Data.EnumMap.Lazy
    #ifdef __GLASGOW_HASKELL__
    -- For GHC, we disable these, pending removal. For anything else,
    -- we just don't define them at all.
      , insertWith'
      , insertWithKey'
      , fold
      , foldWithKey
    #endif
      ) where

    import Data.EnumMap.Lazy

    #ifdef __GLASGOW_HASKELL__
    -- Unfortunately we can't access this module:
    -- import Utils.Containers.Internal.TypeError
    -- so we copy-paste things first:

    import GHC.TypeLits

    class Whoops (a :: Symbol)

    #if __GLASGOW_HASKELL__ >= 800
    instance TypeError ('Text a) => Whoops a
    #endif

    -- | This function is being removed and is no longer usable.
    -- Use 'Data.EnumMap.Strict.insertWith'
    insertWith' :: Whoops "Data.EnumMap.insertWith' is gone. Use Data.EnumMap.Strict.insertWith."
                => (a -> a -> a) -> k -> a -> EnumMap k a -> EnumMap k a
    insertWith' :: forall a k.
    Whoops
      "Data.EnumMap.insertWith' is gone. Use Data.EnumMap.Strict.insertWith." =>
    (a -> a -> a) -> k -> a -> EnumMap k a -> EnumMap k a
    insertWith' a -> a -> a
    _ k
    _ a
    _ EnumMap k a
    _ = EnumMap k a
    forall a. HasCallStack => a
    undefined

    -- | This function is being removed and is no longer usable.
    -- Use 'Data.EnumMap.Strict.insertWithKey'.
    insertWithKey' :: Whoops "Data.EnumMap.insertWithKey' is gone. Use Data.EnumMap.Strict.insertWithKey."
                   => (k -> a -> a -> a) -> k -> a -> EnumMap k a -> EnumMap k a
    insertWithKey' :: forall k a.
    Whoops
      "Data.EnumMap.insertWithKey' is gone. Use Data.EnumMap.Strict.insertWithKey." =>
    (k -> a -> a -> a) -> k -> a -> EnumMap k a -> EnumMap k a
    insertWithKey' k -> a -> a -> a
    _ k
    _ a
    _ EnumMap k a
    _ = EnumMap k a
    forall a. HasCallStack => a
    undefined

    -- | This function is being removed and is no longer usable.
    -- Use 'Data.EnumMap.Lazy.foldr'.
    fold :: Whoops "Data.EnumMap.fold' is gone. Use Data.EnumMap.foldr or Prelude.foldr."
         => (a -> b -> b) -> b -> EnumMap k a -> b
    fold :: forall a b k.
    Whoops
      "Data.EnumMap.fold' is gone. Use Data.EnumMap.foldr or Prelude.foldr." =>
    (a -> b -> b) -> b -> EnumMap k a -> b
    fold a -> b -> b
    _ b
    _ EnumMap k a
    _ = b
    forall a. HasCallStack => a
    undefined

    -- | This function is being removed and is no longer usable.
    -- Use 'foldrWithKey'.
    foldWithKey :: Whoops "Data.EnumMap.foldWithKey is gone. Use foldrWithKey."
                => (k -> a -> b -> b) -> b -> EnumMap k a -> b
    foldWithKey :: forall k a b.
    Whoops "Data.EnumMap.foldWithKey is gone. Use foldrWithKey." =>
    (k -> a -> b -> b) -> b -> EnumMap k a -> b
    foldWithKey k -> a -> b -> b
    _ b
    _ EnumMap k a
    _ = b
    forall a. HasCallStack => a
    undefined
    #endif