module Utils.Either
  ( toMaybeError
  ) where

toMaybeError : Result a b -> Maybe a
toMaybeError result =
  case result of
    Ok _ -> Nothing
    Err x -> Just x