Fix hlint
This commit is contained in:
parent
cb3bb18a5d
commit
98026b2a40
@ -111,7 +111,7 @@ commR CommunicationRoute{..} = do
|
||||
let
|
||||
lookupUser :: UserId -> User
|
||||
lookupUser lId
|
||||
= entityVal . unsafeHead . filter ((== lId) . entityKey) $ (concat $ Map.elems suggestedRecipients) ++ chosenRecipients
|
||||
= entityVal . unsafeHead . filter ((== lId) . entityKey) $ concat (Map.elems suggestedRecipients) ++ chosenRecipients
|
||||
|
||||
let chosenRecipients' = Map.fromList $
|
||||
[ ( (EnumPosition $ RecipientGroup g, pos)
|
||||
@ -156,7 +156,7 @@ commR CommunicationRoute{..} = do
|
||||
-> Widget
|
||||
miLayout liveliness state cellWdgts _delButtons addWdgts = do
|
||||
checkedIdentBase <- newIdent
|
||||
let checkedCategories = Set.mapMonotonic (unEnumPosition . fst) . Set.filter (\k' -> Map.foldrWithKey (\k (_, checkState) -> (||) $ k == k' && checkState /= FormSuccess False && (checkState /= FormMissing || fromMaybe True (fmap snd $ chosenRecipients' !? k))) False state) $ Map.keysSet state
|
||||
let checkedCategories = Set.mapMonotonic (unEnumPosition . fst) . Set.filter (\k' -> Map.foldrWithKey (\k (_, checkState) -> (||) $ k == k' && checkState /= FormSuccess False && (checkState /= FormMissing || maybe True snd (chosenRecipients' !? k))) False state) $ Map.keysSet state
|
||||
checkedIdent c = checkedIdentBase <> "-" <> toPathPiece c
|
||||
categoryIndices c = Set.filter ((== c) . unEnumPosition . fst) $ review liveCoords liveliness
|
||||
$(widgetFile "widgets/communication/recipientLayout")
|
||||
|
||||
@ -16,12 +16,11 @@ import Data.List ((!!))
|
||||
|
||||
tupleBoxCoord :: Int -> DecQ
|
||||
tupleBoxCoord tupleDim = do
|
||||
cs <- sequence . replicate tupleDim $ newName "c"
|
||||
cs <- replicateM tupleDim $ newName "c"
|
||||
|
||||
let tupleType = foldl appT (tupleT tupleDim) $ map varT cs
|
||||
tCxt = cxt $ concat
|
||||
[ [ [t|IsBoxCoord $(varT c)|] | c <- cs ]
|
||||
]
|
||||
tCxt = cxt
|
||||
[ [t|IsBoxCoord $(varT c)|] | c <- cs ]
|
||||
fieldLenses =
|
||||
[ [e|_1|]
|
||||
, [e|_2|]
|
||||
|
||||
@ -19,7 +19,7 @@ maybeBearerToken = runMaybeT $ catchIfMaybeT cPred requireBearerToken
|
||||
|
||||
requireBearerToken :: (MonadHandler m, HandlerSite m ~ UniWorX) => m (BearerToken UniWorX)
|
||||
requireBearerToken = liftHandlerT $ do
|
||||
token <- exceptT (guardAuthResult >=> error "askToken should not throw `Authorized`") return $ askTokenUnsafe
|
||||
token <- exceptT (guardAuthResult >=> error "askToken should not throw `Authorized`") return askTokenUnsafe
|
||||
mAuthId <- maybeAuthId
|
||||
currentRoute <- maybe (permissionDeniedI MsgUnauthorizedToken404) return =<< getCurrentRoute
|
||||
isWrite <- isWriteRequest currentRoute
|
||||
|
||||
@ -32,7 +32,7 @@ dispatchJobCorrectorInvitation jInviter jCorrectorInvitation@SheetCorrectorInvit
|
||||
invitationUrl' <- toTextUrl invitationUrl
|
||||
|
||||
mailT def $ do
|
||||
_mailTo .= [Address Nothing (CI.original $ sheetCorrectorInvitationEmail)]
|
||||
_mailTo .= [Address Nothing $ CI.original sheetCorrectorInvitationEmail]
|
||||
replaceMailHeader "Reply-To" . Just . renderAddress $ Address (Just userDisplayName) (CI.original userEmail)
|
||||
replaceMailHeader "Auto-Submitted" $ Just "auto-generated"
|
||||
setSubjectI $ MsgMailSubjectCorrectorInvitation courseTerm courseSchool courseShorthand sheetName
|
||||
|
||||
@ -31,7 +31,7 @@ dispatchJobLecturerInvitation jInviter jLecturerInvitation@LecturerInvitation{..
|
||||
invitationUrl' <- toTextUrl invitationUrl
|
||||
|
||||
mailT def $ do
|
||||
_mailTo .= [Address Nothing (CI.original $ lecturerInvitationEmail)]
|
||||
_mailTo .= [Address Nothing $ CI.original lecturerInvitationEmail]
|
||||
replaceMailHeader "Reply-To" . Just . renderAddress $ Address (Just userDisplayName) (CI.original userEmail)
|
||||
replaceMailHeader "Auto-Submitted" $ Just "auto-generated"
|
||||
setSubjectI $ MsgMailSubjectLecturerInvitation courseTerm courseSchool courseShorthand
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
module Utils.Lens ( module Utils.Lens ) where
|
||||
|
||||
import ClassyPrelude.Yesod hiding ((.=))
|
||||
import ClassyPrelude.Yesod
|
||||
import Model
|
||||
import Control.Lens as Utils.Lens hiding ((<.>), universe, snoc)
|
||||
import Control.Lens.Extras as Utils.Lens (is)
|
||||
|
||||
@ -75,8 +75,8 @@ tuplePathPiece tupleDim = do
|
||||
tupleSeparator :: Text
|
||||
tupleSeparator = ","
|
||||
|
||||
xs <- sequence . replicate tupleDim $ newName "x" :: Q [Name]
|
||||
xs' <- sequence . replicate tupleDim $ newName "x'" :: Q [Name]
|
||||
xs <- replicateM tupleDim $ newName "x" :: Q [Name]
|
||||
xs' <- replicateM tupleDim $ newName "x'" :: Q [Name]
|
||||
|
||||
let tupleType = foldl appT (tupleT tupleDim) $ map varT xs
|
||||
tCxt = cxt
|
||||
|
||||
@ -12,7 +12,7 @@ import Yesod.Auth (AuthId)
|
||||
|
||||
import Utils (NTop(..), hoistMaybe, SessionKey(..))
|
||||
import Utils.Parameters
|
||||
import Utils.Lens hiding ((.=))
|
||||
import Utils.Lens
|
||||
|
||||
import Model
|
||||
import Model.Tokens
|
||||
|
||||
Loading…
Reference in New Issue
Block a user