From 56115491d0dce58bf06f92fd5022363eb05a3755 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Thu, 5 Nov 2015 20:20:19 +0300 Subject: Throw ZeroBinError instead of return Either It can throw HttpException anyway --- cli/Main.hs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'cli') diff --git a/cli/Main.hs b/cli/Main.hs index 5d6b445..bcd7d54 100644 --- a/cli/Main.hs +++ b/cli/Main.hs @@ -72,9 +72,5 @@ main = do cnt <- getContent (args `O.isPresent` O.longOption "file") text case getExpiration expire of Nothing -> die "invalid value for expiration" - Just e -> do - rc <- share bin e cnt - case rc of - Left err -> die err - Right uri -> putStrLn uri + Just e -> share bin e cnt >>= putStrLn -- cgit v1.2.3