reducing warnings

This commit is contained in:
nek0 2014-12-08 06:26:45 +01:00
parent 38ade0ad60
commit 46b5c80f53
2 changed files with 2 additions and 7 deletions

View file

@ -1,7 +1,6 @@
module Handler.Medium where module Handler.Medium where
import Import import Import
import Helper
import Data.Time import Data.Time
import Data.Maybe import Data.Maybe
import qualified Data.Text as T import qualified Data.Text as T
@ -24,14 +23,14 @@ getMediumR mediumId = do
return $ Just $ getUserIdFromText tempUserId return $ Just $ getUserIdFromText tempUserId
Nothing -> Nothing ->
return Nothing return Nothing
userSlug <- case userId of userSl <- case userId of
Just uId -> do Just uId -> do
u <- runDB $ getJust uId u <- runDB $ getJust uId
return $ Just $ userSlug u return $ Just $ userSlug u
Nothing -> Nothing ->
return Nothing return Nothing
presence <- return $ (userId == (Just ownerId) || userId == Just (albumOwner album)) presence <- return $ (userId == (Just ownerId) || userId == Just (albumOwner album))
(commentWidget, enctype) <- generateFormPost $ commentForm userId userSlug mediumId Nothing (commentWidget, enctype) <- generateFormPost $ commentForm userId userSl mediumId Nothing
comments <- runDB $ selectList [CommentOrigin ==. mediumId, CommentParent ==. Nothing] [Desc CommentTime] comments <- runDB $ selectList [CommentOrigin ==. mediumId, CommentParent ==. Nothing] [Desc CommentTime]
replies <- runDB $ selectList [CommentOrigin ==. mediumId, CommentParent !=. Nothing] [Desc CommentTime] replies <- runDB $ selectList [CommentOrigin ==. mediumId, CommentParent !=. Nothing] [Desc CommentTime]
defaultLayout $ do defaultLayout $ do

View file

@ -2,13 +2,9 @@
module Handler.Signup where module Handler.Signup where
import Import as I import Import as I
import System.Random
import Data.Text as T import Data.Text as T
import Data.Text.Encoding import Data.Text.Encoding
import Data.ByteString as B
import Data.Maybe import Data.Maybe
import Network.Mail.Mime
import Text.Blaze.Html.Renderer.Utf8
getSignupR :: Handler Html getSignupR :: Handler Html
getSignupR = do getSignupR = do