summaryrefslogtreecommitdiff
path: root/src/GF/Data/Operations.hs
diff options
context:
space:
mode:
authorbringert <unknown>2004-08-23 07:51:36 +0000
committerbringert <unknown>2004-08-23 07:51:36 +0000
commit65f012d15513814bd2cc4ad74f54edd35ade13fe (patch)
tree089419071773038e8357a6b97a9ec0481df2a338 /src/GF/Data/Operations.hs
parent25ffe15333a881022047409a1c12a17dd41d1198 (diff)
Added CFGM format (pm -printer=cfgm) and utf8 conversion for pm.
Diffstat (limited to 'src/GF/Data/Operations.hs')
-rw-r--r--src/GF/Data/Operations.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/GF/Data/Operations.hs b/src/GF/Data/Operations.hs
index 9bed80392..024318594 100644
--- a/src/GF/Data/Operations.hs
+++ b/src/GF/Data/Operations.hs
@@ -15,7 +15,10 @@ infixl 9 !?
ifNull :: b -> ([a] -> b) -> [a] -> b
ifNull b f xs = if null xs then b else f xs
-
+
+onSnd :: (a -> b) -> (c,a) -> (c,b)
+onSnd f (x, y) = (x, f y)
+
-- the Error monad
data Err a = Ok a | Bad String -- like Maybe type with error msgs