    {-# OPTIONS_GHC -Wno-orphans #-}

    module IsomorphismClass.Relations.ByteArrayAndShortByteString where

    import qualified Data.ByteString.Short
    import qualified Data.ByteString.Short.Internal
    import qualified Data.Primitive.ByteArray
    import IsomorphismClass.Classes

    instance IsomorphicTo Data.ByteString.Short.ShortByteString Data.Primitive.ByteArray.ByteArray where
      to :: ByteArray -> ShortByteString
    to (Data.Primitive.ByteArray.ByteArray ByteArray#
    array) =
        ByteArray# -> ShortByteString
    Data.ByteString.Short.Internal.SBS ByteArray#
    array

    instance IsomorphicTo Data.Primitive.ByteArray.ByteArray Data.ByteString.Short.ShortByteString where
      to :: ShortByteString -> ByteArray
    to (Data.ByteString.Short.Internal.SBS ByteArray#
    array) =
        ByteArray# -> ByteArray
    Data.Primitive.ByteArray.ByteArray ByteArray#
    array