aboutsummaryrefslogtreecommitdiff
path: root/src/Utils/Either.hs
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-04-14 00:10:21 +0200
committerJoris Guyonvarch2015-04-14 00:12:04 +0200
commitd3dd0e129658e3617f9e6e4fa0910cb15c42520d (patch)
tree7eed51e2f4dd9c599daa1d9728a6ca8c86e3897e /src/Utils/Either.hs
parenta2c9ca0ee7022981fa563ed867e85cdeae3b1590 (diff)
downloadad-listener-d3dd0e129658e3617f9e6e4fa0910cb15c42520d.tar.gz
ad-listener-d3dd0e129658e3617f9e6e4fa0910cb15c42520d.tar.bz2
ad-listener-d3dd0e129658e3617f9e6e4fa0910cb15c42520d.zip
Send mail to notify for new ads
Diffstat (limited to 'src/Utils/Either.hs')
-rw-r--r--src/Utils/Either.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Utils/Either.hs b/src/Utils/Either.hs
new file mode 100644
index 0000000..5d62dcc
--- /dev/null
+++ b/src/Utils/Either.hs
@@ -0,0 +1,7 @@
+module Utils.Either
+ ( mapLeft
+ ) where
+
+mapLeft :: (a -> c) -> Either a b -> Either c b
+mapLeft f (Left l) = Left (f l)
+mapLeft _ (Right r) = (Right r)