aboutsummaryrefslogtreecommitdiff
path: root/client/src/Util/Either.hs
diff options
context:
space:
mode:
authorJoris2018-10-30 18:04:58 +0100
committerJoris2018-10-30 18:04:58 +0100
commit50fb8fa48d1c4881da20b4ecf6d68a772301e713 (patch)
tree99c30c644d40664a9a7bb4a27e838d7cccda7a5f /client/src/Util/Either.hs
parent40b4994797a797b1fa86cafda789a5c488730c6d (diff)
downloadbudget-50fb8fa48d1c4881da20b4ecf6d68a772301e713.tar.gz
budget-50fb8fa48d1c4881da20b4ecf6d68a772301e713.tar.bz2
budget-50fb8fa48d1c4881da20b4ecf6d68a772301e713.zip
Update table when adding or removing a payment
Diffstat (limited to 'client/src/Util/Either.hs')
-rw-r--r--client/src/Util/Either.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/src/Util/Either.hs b/client/src/Util/Either.hs
new file mode 100644
index 0000000..2910d95
--- /dev/null
+++ b/client/src/Util/Either.hs
@@ -0,0 +1,7 @@
+module Util.Either
+ ( eitherToMaybe
+ ) where
+
+eitherToMaybe :: Either a b -> Maybe b
+eitherToMaybe (Right b) = Just b
+eitherToMaybe _ = Nothing