From 9e510f5245ac8ee1a7524fbbf49447daaef846d3 Mon Sep 17 00:00:00 2001 From: peb Date: Sat, 16 Apr 2005 04:40:48 +0000 Subject: "Committed_by_peb" --- src/GF/Infra/Print.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/GF/Infra') diff --git a/src/GF/Infra/Print.hs b/src/GF/Infra/Print.hs index 8feeae3a0..75fa52a17 100644 --- a/src/GF/Infra/Print.hs +++ b/src/GF/Infra/Print.hs @@ -4,9 +4,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:50 $ +-- > CVS $Date: 2005/04/16 05:40:49 $ -- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Revision: 1.2 $ -- -- Pretty-printing ----------------------------------------------------------------------------- @@ -14,7 +14,7 @@ module GF.Infra.Print (Print(..), prtBefore, prtAfter, prtSep, - prtBeforeAfter, + prtBeforeAfter, prtPairList, prIO ) where @@ -43,6 +43,9 @@ prtSep sep = concat . intersperse sep . map prt prtBeforeAfter :: Print a => String -> String -> [a] -> String prtBeforeAfter before after as = concat [ before ++ prt a ++ after | a <- as ] +prtPairList :: (Print a, Print b) => String -> String -> [(a,b)] -> String +prtPairList comma sep xys = prtSep sep [ prt x ++ comma ++ prt y | (x,y) <- xys ] + prIO :: Print a => a -> IO () prIO = putStr . prt -- cgit v1.2.3