{-# LANGUAGE CPP, FlexibleInstances, MultiParamTypeClasses, Safe #-}
{-# OPTIONS_GHC -Wall -fno-warn-orphans -Werror #-}
module Data.Tuple.Append.Instances.ByteString.Safe () where
import Data.ByteString(ByteString, append, cons, snoc)
import qualified Data.ByteString.Lazy as BL(ByteString, append, cons, snoc)
import Data.Tuple.Append.Class(TupleAddL((<++)), TupleAddR((++>)), TupleAppend((+++)))
import Data.Word(Word8)
instance TupleAddL Word8 ByteString ByteString where
<++ :: Word8 -> ByteString -> ByteString
(<++) = Word8 -> ByteString -> ByteString
cons
instance TupleAddR ByteString Word8 ByteString where
++> :: ByteString -> Word8 -> ByteString
(++>) = ByteString -> Word8 -> ByteString
snoc
instance TupleAppend ByteString ByteString ByteString where
+++ :: ByteString -> ByteString -> ByteString
(+++) = ByteString -> ByteString -> ByteString
append
instance TupleAddL Word8 BL.ByteString BL.ByteString where
<++ :: Word8 -> ByteString -> ByteString
(<++) = Word8 -> ByteString -> ByteString
BL.cons
instance TupleAddR BL.ByteString Word8 BL.ByteString where
++> :: ByteString -> Word8 -> ByteString
(++>) = ByteString -> Word8 -> ByteString
BL.snoc
instance TupleAppend BL.ByteString BL.ByteString BL.ByteString where
+++ :: ByteString -> ByteString -> ByteString
(+++) = ByteString -> ByteString -> ByteString
BL.append