    {-# OPTIONS_GHC -Wno-orphans #-}

    module IsomorphismClass.Relations.IntMapAndMapOfInt where

    import qualified Data.IntMap.Strict
    import qualified Data.Map.Strict
    import IsomorphismClass.Classes
    import IsomorphismClass.Prelude

    instance IsomorphicTo (Map Int v) (IntMap v) where
      to :: IntMap v -> Map Int v
    to = [(Int, v)] -> Map Int v
    forall k a. Ord k => [(k, a)] -> Map k a
    Data.Map.Strict.fromList ([(Int, v)] -> Map Int v)
    -> (IntMap v -> [(Int, v)]) -> IntMap v -> Map Int v
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    forall {k} (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
    Category cat =>
    cat b c -> cat a b -> cat a c
    . IntMap v -> [(Int, v)]
    forall a. IntMap a -> [(Int, a)]
    Data.IntMap.Strict.toList

    instance IsomorphicTo (IntMap v) (Map Int v) where
      to :: Map Int v -> IntMap v
    to = [(Int, v)] -> IntMap v
    forall a. [(Int, a)] -> IntMap a
    Data.IntMap.Strict.fromList ([(Int, v)] -> IntMap v)
    -> (Map Int v -> [(Int, v)]) -> Map Int v -> IntMap v
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    forall {k} (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
    Category cat =>
    cat b c -> cat a b -> cat a c
    . Map Int v -> [(Int, v)]
    forall k a. Map k a -> [(k, a)]
    Data.Map.Strict.toList