Removed warnings about unused symbols

This commit is contained in:
Braden Walters 2015-12-06 21:14:58 +01:00
parent 034685e40e
commit e0092b300a
4 changed files with 7 additions and 7 deletions

View file

@ -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)

View file

@ -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

View file

@ -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]

View file

@ -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