From e0092b300a835599a4712c55f62143ce6fffea30 Mon Sep 17 00:00:00 2001 From: Braden Walters Date: Sun, 6 Dec 2015 21:14:58 +0100 Subject: [PATCH] Removed warnings about unused symbols --- Handler/Avatar.hs | 8 ++++---- Handler/Buy.hs | 2 +- Handler/Home.hs | 2 +- Handler/SupplierActions.hs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Handler/Avatar.hs b/Handler/Avatar.hs index 14d4e95..3a3e87f 100755 --- a/Handler/Avatar.hs +++ b/Handler/Avatar.hs @@ -44,8 +44,8 @@ postNewAvatarR = do case res of FormSuccess na -> do raw <- runResourceT $ fileSource (avatarNewFile na) $$ sinkLbs - (thumb, hash) <- generateThumb $ B.concat $ L.toChunks raw - runDB $ insert_ $ Avatar (avatarNewIdent na) thumb hash + (thumb, hash') <- generateThumb $ B.concat $ L.toChunks raw + runDB $ insert_ $ Avatar (avatarNewIdent na) thumb hash' setMessageI MsgAvatarUploadSuccessfull redirect HomeR _ -> do @@ -113,11 +113,11 @@ updateAvatar aId (AvatarMod ident Nothing) = runDB $ update aId [AvatarIdent =. ident] updateAvatar aId (AvatarMod ident (Just fi)) = do raw <- runResourceT $ fileSource fi $$ sinkLbs - (thumb, hash) <- generateThumb $ B.concat $ L.toChunks raw + (thumb, hash') <- generateThumb $ B.concat $ L.toChunks raw runDB $ update aId [ AvatarIdent =. ident , AvatarData =. thumb - , AvatarHash =. hash + , AvatarHash =. hash' ] generateThumb :: ByteString -> Handler (ByteString, ByteString) diff --git a/Handler/Buy.hs b/Handler/Buy.hs index 7b7788f..3527681 100755 --- a/Handler/Buy.hs +++ b/Handler/Buy.hs @@ -23,7 +23,7 @@ getBuyR :: UserId -> BeverageId -> Handler Html getBuyR uId bId = do mTup <- checkData uId bId case mTup of - Just (user, bev) -> do + Just (_, bev) -> do master <- getYesod (buyWidget, enctype) <- generateFormPost $ renderBootstrap3 BootstrapBasicForm diff --git a/Handler/Home.hs b/Handler/Home.hs index c936a27..7ec6ce1 100755 --- a/Handler/Home.hs +++ b/Handler/Home.hs @@ -47,7 +47,7 @@ getUserReactivateR :: UserId -> Handler Html getUserReactivateR uId = do mUser <- runDB $ get uId case mUser of - Just user -> do + Just _ -> do time <- liftIO getCurrentTime let secs = R.read $ formatTime defaultTimeLocale "%s" time runDB $ update uId [UserTimestamp =. secs] diff --git a/Handler/SupplierActions.hs b/Handler/SupplierActions.hs index 4f64f82..5decbc5 100755 --- a/Handler/SupplierActions.hs +++ b/Handler/SupplierActions.hs @@ -102,7 +102,7 @@ getDeleteSupplierR :: SupplierId -> Handler Html getDeleteSupplierR sId = do mSup <- runDB $ get sId case mSup of - Just sup -> do + Just _ -> do a <- runDB $ selectList [BeverageSupplier ==. (Just sId)] [] if null a then do