We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit b9abba42 authored by Mitchell Rosen's avatar Mitchell Rosen

compiler errors fixed

parent cac310fb
......@@ -94,7 +94,7 @@ data CommentMods = CommentMods
, mod_user_map :: Map UserId User -> Map UserId User
, mod_closure_map :: Map CommentId CommentClosing -> Map CommentId CommentClosing
, mod_retract_map :: Map CommentId CommentRetracting -> Map CommentId CommentRetracting
, mod_ticket_map :: Map CommentId Ticket -> Map CommentId Ticket
, mod_ticket_map :: Map CommentId (Entity Ticket) -> Map CommentId (Entity Ticket)
, mod_flag_map :: Map CommentId (CommentFlagging, [FlagReason]) -> Map CommentId (CommentFlagging, [FlagReason])
, mod_tag_map :: Map TagId Tag -> Map TagId Tag
}
......@@ -601,14 +601,14 @@ closeOrRetractMap comment_field comment_projection comment_ids = fmap (foldr ste
-- | Given a collection of CommentId, make a map from CommentId to Entity Ticket. Comments that
-- are not tickets will simply not be in the map.
makeTicketMapDB :: (IsList c, CommentId ~ Item c) => c -> DB (Map CommentId Ticket)
makeTicketMapDB :: (IsList c, CommentId ~ Item c) => c -> DB (Map CommentId (Entity Ticket))
makeTicketMapDB comment_ids = fmap (foldr step mempty) $
select $
from $ \t -> do
where_ (t ^. TicketComment `in_` valList comment_ids)
return t
where
step (Entity _ t) = M.insert (ticketComment t) t
step t = M.insert (ticketComment (entityVal t)) t
makeClaimedTicketMapDB :: [CommentId] -> DB (Map CommentId (Entity TicketClaiming))
makeClaimedTicketMapDB comment_ids = fmap (M.fromList . map (\(Value x, y) -> (x, y))) $
......
......@@ -242,7 +242,7 @@ commentForestWidget
-> Map UserId User
-> Map CommentId CommentClosing
-> Map CommentId CommentRetracting
-> Map CommentId Ticket
-> Map CommentId (Entity Ticket)
-> Map CommentId (CommentFlagging, [FlagReason])
-> Bool -- ^ Is preview?
-> MaxDepth -- ^ Max depth.
......@@ -295,7 +295,7 @@ commentTreeWidget
-> Map UserId User
-> Map CommentId CommentClosing
-> Map CommentId CommentRetracting
-> Map CommentId Ticket
-> Map CommentId (Entity Ticket)
-> Map CommentId (CommentFlagging, [FlagReason])
-> Bool -- ^ Is preview?
-> MaxDepth
......@@ -316,7 +316,7 @@ commentTreeWidget'
-> Map UserId User
-> Map CommentId CommentClosing
-> Map CommentId CommentRetracting
-> Map CommentId Ticket
-> Map CommentId (Entity Ticket)
-> Map CommentId (CommentFlagging, [FlagReason])
-> Bool -- ^ Is preview?
-> MaxDepth
......@@ -393,7 +393,7 @@ commentWidget :: Entity Comment -- ^ Comment.
-> User -- ^ Comment poster.
-> Maybe CommentClosing -- ^ Is this closed?
-> Maybe CommentRetracting -- ^ Is this retracted?
-> Maybe Ticket -- ^ Is this a ticket?
-> Maybe (Entity Ticket) -- ^ Is this a ticket?
-> Maybe (CommentFlagging, [FlagReason]) -- ^ Is this flagged?
-> Bool -- ^ Is this a preview?
-> Widget -- ^ Inner widget (children comments, 'expand' link, reply box, etc)
......
......@@ -26,7 +26,7 @@ renderCommentPostedEvent
-> Map UserId User
-> Map CommentId CommentClosing
-> Map CommentId CommentRetracting
-> Map CommentId Ticket
-> Map CommentId (Entity Ticket)
-> Map CommentId (CommentFlagging, [FlagReason])
-> Widget
renderCommentPostedEvent
......
......@@ -64,7 +64,7 @@
awaiting moderator approval
<div .comment-body>
#{markDownWidgetWith commentTextTransform (commentText comment)}
^{markdownWidgetWith commentTextTransform (commentText comment)}
<div>
$forall tag <- tags
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment