From 0a4d3c8f12dc5797a919a00b6bcaf759947687cc Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 17 Jun 2018 23:24:47 +0200 Subject: Add ouest france parser --- src/executable/haskell/Utils/Either.hs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/executable/haskell/Utils/Either.hs (limited to 'src/executable/haskell/Utils/Either.hs') diff --git a/src/executable/haskell/Utils/Either.hs b/src/executable/haskell/Utils/Either.hs new file mode 100644 index 0000000..5d62dcc --- /dev/null +++ b/src/executable/haskell/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) -- cgit v1.2.3