    {-# OPTIONS_GHC -Wno-orphans #-}

    module IsomorphismClass.Relations.LazyByteStringBuilderAndShortByteString where

    import qualified Data.ByteString.Builder
    import qualified Data.ByteString.Lazy
    import qualified Data.ByteString.Short
    import IsomorphismClass.Classes
    import IsomorphismClass.Prelude

    instance IsomorphicTo Data.ByteString.Builder.Builder Data.ByteString.Short.ShortByteString where
      to :: ShortByteString -> Builder
    to = ShortByteString -> Builder
    Data.ByteString.Builder.shortByteString

    instance IsomorphicTo Data.ByteString.Short.ShortByteString Data.ByteString.Builder.Builder where
      to :: Builder -> ShortByteString
    to = ByteString -> ShortByteString
    Data.ByteString.Short.toShort (ByteString -> ShortByteString)
    -> (Builder -> ByteString) -> Builder -> ShortByteString
    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
    . LazyByteString -> ByteString
    Data.ByteString.Lazy.toStrict (LazyByteString -> ByteString)
    -> (Builder -> LazyByteString) -> Builder -> ByteString
    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
    . Builder -> LazyByteString
    Data.ByteString.Builder.toLazyByteString