From c345f9daa28e0c174b35413addf78df0a793f8c1 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Sat, 1 Aug 2015 00:31:36 +0200 Subject: Adding error feedbacks when adding a payment --- src/client/Utils/Either.elm | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/client/Utils/Either.elm (limited to 'src/client/Utils/Either.elm') diff --git a/src/client/Utils/Either.elm b/src/client/Utils/Either.elm new file mode 100644 index 0000000..10c40e3 --- /dev/null +++ b/src/client/Utils/Either.elm @@ -0,0 +1,9 @@ +module Utils.Either + ( toMaybeError + ) where + +toMaybeError : Result a b -> Maybe a +toMaybeError result = + case result of + Ok _ -> Nothing + Err x -> Just x -- cgit v1.2.3