module Darcs.Util.Show
    ( appPrec, BSWrapper(..)
    ) where

import Darcs.Prelude

import qualified Data.ByteString as B

appPrec :: Int
appPrec :: Int
appPrec = Int
10

newtype BSWrapper = BSWrapper B.ByteString

instance Show BSWrapper where
    showsPrec :: Int -> BSWrapper -> ShowS
showsPrec Int
d (BSWrapper ByteString
bs) =
        Bool -> ShowS -> ShowS
showParen (Int
d Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> Int
appPrec) (ShowS -> ShowS) -> ShowS -> ShowS
forall a b. (a -> b) -> a -> b
$
            String -> ShowS
showString String
"Data.ByteString.Char8.pack " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
            Int -> ByteString -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec (Int
appPrec Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
1) ByteString
bs