    {-# OPTIONS_GHC -Wno-orphans #-}

    module IsomorphismClass.Relations.ByteStringAndLazyByteStringBuilder where

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

    instance IsomorphicTo ByteString Data.ByteString.Builder.Builder where
      to :: Builder -> ByteString
    to = 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

    instance IsomorphicTo Data.ByteString.Builder.Builder ByteString where
      to :: ByteString -> Builder
    to = ByteString -> Builder
    Data.ByteString.Builder.byteString