diff options
Diffstat (limited to 'client/src/Util/Either.hs')
-rw-r--r-- | client/src/Util/Either.hs | 7 |
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..e76bc8a --- /dev/null +++ b/client/src/Util/Either.hs @@ -0,0 +1,7 @@ +module Util.Either + ( eitherToMaybe + ) where + +eitherToMaybe :: forall a b. Either a b -> Maybe b +eitherToMaybe (Right b) = Just b +eitherToMaybe _ = Nothing |