    {-# OPTIONS_GHC -Wno-orphans #-}

    module IsomorphismClass.Relations.LazyByteStringBuilderAndWord8List where

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

    instance IsomorphicTo Data.ByteString.Builder.Builder [Word8] where
      to :: [Word8] -> Builder
    to = LazyByteString -> Builder
    Data.ByteString.Builder.lazyByteString (LazyByteString -> Builder)
    -> ([Word8] -> LazyByteString) -> [Word8] -> Builder
    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
    . [Word8] -> LazyByteString
    Data.ByteString.Lazy.pack

    instance IsomorphicTo [Word8] Data.ByteString.Builder.Builder where
      to :: Builder -> [Word8]
    to = LazyByteString -> [Word8]
    Data.ByteString.Lazy.unpack (LazyByteString -> [Word8])
    -> (Builder -> LazyByteString) -> Builder -> [Word8]
    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