Permalink
Browse files

Support the return of an IO Status from both uploadImage and uploadIm…

…ageWithAttr
  • Loading branch information...
1 parent fd9e456 commit 2142b904a37cc7980a2c4d15d2248060be606b43 @killerswan committed May 2, 2012
Showing with 8 additions and 6 deletions.
  1. +8 −6 upload.hs
View
@@ -100,10 +100,12 @@ main =
do
token <- readToken (tokenFile opts)
- case coord opts
- of Nothing -> uploadImage token (status opts) (image opts)
- Just latlon -> uploadImageWithAttr token (status opts) (image opts)
- [ DisplayCoords
- , LatLon (fst latlon) (snd latlon)
- ]
+ new <- case coord opts
+ of Nothing -> uploadImage token (status opts) (image opts)
+ Just latlon -> uploadImageWithAttr token (status opts) (image opts)
+ [ DisplayCoords
+ , LatLon (fst latlon) (snd latlon)
+ ]
+
+ print new

0 comments on commit 2142b90

Please sign in to comment.