aboutsummaryrefslogtreecommitdiffstats
path: root/app/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Main.hs')
-rw-r--r--app/Main.hs49
1 files changed, 18 insertions, 31 deletions
diff --git a/app/Main.hs b/app/Main.hs
index 4d3902d..1de7360 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -626,20 +626,16 @@ main = do
( \issue ->
let title = map (P.annotate P.bold . P.pretty) (T.words issue.title)
tags = prettyTags (issue.tags ++ if internalTags then issue.internalTags else [])
- openedBy =
- fromProvenance $
- P.annotate (P.color P.Black) . ("by" <+>) . P.pretty . (.first.author.name)
- openedOn =
- fromProvenance $
- P.annotate (P.color P.Black) . ("on" <+>) . P.pretty . show . utctDay . (.first.date)
- fromProvenance = flip fmap issue.provenance
+ openedBy = P.annotate (P.color P.Black) ("by" <+> P.pretty issue.provenance.first.author.name)
+ openedOn = P.annotate (P.color P.Black) ("on" <+> P.pretty (show (utctDay issue.provenance.first.date)))
in P.nest 4 $
P.fillSep
( concat $
[ title,
tags,
- maybeToList openedOn,
- maybeToList openedBy
+ [ openedOn,
+ openedBy
+ ]
]
)
)
@@ -655,20 +651,16 @@ main = do
( \issue ->
let title = map (P.annotate P.bold . P.pretty) (T.words issue.title)
tags = prettyTags (issue.tags ++ if internalTags then issue.internalTags else [])
- openedBy =
- fromProvenance $
- P.annotate (P.color P.Black) . ("by" <+>) . P.pretty . (.first.author.name)
- openedOn =
- fromProvenance $
- P.annotate (P.color P.Black) . ("on" <+>) . P.pretty . show . utctDay . (.first.date)
- fromProvenance = flip fmap issue.provenance
+ openedBy = P.annotate (P.color P.Black) ("by" <+> (P.pretty (issue.provenance.first.author.name)))
+ openedOn = P.annotate (P.color P.Black) ("on" <+> (P.pretty (show (utctDay ((issue.provenance.first.date))))))
in P.nest 4 $
P.fillSep
( concat $
[ title,
tags,
- maybeToList openedOn,
- maybeToList openedBy
+ [ openedOn,
+ openedBy
+ ]
]
)
)
@@ -722,19 +714,14 @@ main = do
issue.file
++ ":"
++ show issue.start.row
- ++ ( case issue.provenance of
- Nothing ->
- "HEAD"
- Just provenance ->
- "\nvia "
- ++ T.unpack provenance.first.hash
- ++ "\nby "
- ++ T.unpack provenance.first.author.name
- ++ " <"
- ++ T.unpack provenance.first.author.email
- ++ ">\nat "
- ++ show provenance.first.date
- )
+ ++ "\nvia "
+ ++ T.unpack issue.provenance.first.hash
+ ++ "\nby "
+ ++ T.unpack issue.provenance.first.author.name
+ ++ " <"
+ ++ T.unpack issue.provenance.first.author.email
+ ++ ">\nat "
+ ++ show issue.provenance.first.date
++ "\n\n"
sh_
( ( case width of