2 {-# OPTIONS_GHC -cpp #-}
5 module Darcs.Show(Show1(..), Show2(..), showOp2, app_prec) where
10 show1 :: a C(x) -> String
11 show1 x = showsPrec1 0 x ""
12 showsPrec1 :: Int -> a C(x) -> ShowS
13 showsPrec1 _ x s = show1 x ++ s
16 show2 :: a C(x y) -> String
17 show2 x = showsPrec2 0 x ""
18 showsPrec2 :: Int -> a C(x y) -> ShowS
19 showsPrec2 _ x s = show2 x ++ s
21 showOp2 :: (Show2 a, Show2 b) => Int -> String -> Int -> a C(w x) -> b C(y z) -> String -> String
22 showOp2 prec opstr d x y = showParen (d > prec) $ showsPrec2 (prec + 1) x .
23 showString opstr . showsPrec2 (prec + 1) y