    {-# OPTIONS_GHC -Wno-orphans #-}

    module IsomorphismClass.Relations.BoxedVectorAndSeq where

    import qualified Data.Sequence
    import qualified Data.Vector
    import IsomorphismClass.Classes
    import IsomorphismClass.Prelude

    instance IsomorphicTo (Vector a) (Seq a) where
      to :: Seq a -> Vector a
    to = [a] -> Vector a
    forall a. [a] -> Vector a
    Data.Vector.fromList ([a] -> Vector a) -> (Seq a -> [a]) -> Seq a -> Vector a
    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
    . Seq a -> [a]
    Seq a -> [Item (Seq a)]
    forall l. IsList l => l -> [Item l]
    toList

    instance IsomorphicTo (Seq a) (Vector a) where
      to :: Vector a -> Seq a
    to = [a] -> Seq a
    forall a. [a] -> Seq a
    Data.Sequence.fromList ([a] -> Seq a) -> (Vector a -> [a]) -> Vector a -> Seq a
    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
    . Vector a -> [a]
    forall a. Vector a -> [a]
    Data.Vector.toList