summaryrefslogtreecommitdiff
path: root/src/GF/Infra
diff options
context:
space:
mode:
authorpeb <unknown>2005-04-16 04:40:48 +0000
committerpeb <unknown>2005-04-16 04:40:48 +0000
commit9e510f5245ac8ee1a7524fbbf49447daaef846d3 (patch)
tree1a4f923fa1a4247146d7d0b4caf56021fc0f70a6 /src/GF/Infra
parent9d112935dc072c399ae86be4fa9cc273b479928e (diff)
"Committed_by_peb"
Diffstat (limited to 'src/GF/Infra')
-rw-r--r--src/GF/Infra/Print.hs9
1 files changed, 6 insertions, 3 deletions
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