summaryrefslogtreecommitdiff
path: root/src/GF/Data
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Data')
-rw-r--r--src/GF/Data/Operations.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/GF/Data/Operations.hs b/src/GF/Data/Operations.hs
index 7110a7ac0..6dd78e1bc 100644
--- a/src/GF/Data/Operations.hs
+++ b/src/GF/Data/Operations.hs
@@ -26,6 +26,10 @@ instance Monad Err where
Ok a >>= f = f a
Bad s >>= f = Bad s
+instance Functor Err where -- added 2/10/2003 by PEB
+ fmap f (Ok a) = Ok (f a)
+ fmap f (Bad s) = Bad s
+
-- analogue of maybe
err :: (String -> b) -> (a -> b) -> Err a -> b
err d f e = case e of