aboutsummaryrefslogtreecommitdiffstats
path: root/app/Main.hs
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2023-10-04 11:22:23 +0200
committerLibravatar Alexander Foremny <aforemny@posteo.de>2023-10-04 11:22:23 +0200
commitf72c9d076057729d98f12235c00482710d166cf8 (patch)
tree2d7dca5a956e08cbe3b9361e49b433d651e51e10 /app/Main.hs
parent9b5bd101f7c511a9a0dd4a12a5480ff2628f0b50 (diff)
fix tests
Diffstat (limited to 'app/Main.hs')
-rw-r--r--app/Main.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/Main.hs b/app/Main.hs
index 723a0a1..87951b6 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE OverloadedRecordDot #-}
{-# LANGUAGE OverloadedStrings #-}
@@ -43,6 +44,7 @@
module Main where
import Control.Exception (Exception, catch, throw, throwIO)
+import Control.Monad (when)
import Data.Aeson qualified as A
import Data.ByteString.Lazy qualified as L
import Data.ByteString.Lazy.Char8 qualified as L8
@@ -124,8 +126,9 @@ main = do
showMatches :: Issue -> IO ()
showMatches issue = do
T.putStrLn issue.title
- T.putStrLn ""
- T.putStrLn issue.description
+ when (not (T.null issue.description)) do
+ T.putStrLn ""
+ T.putStrLn issue.description
listMatches :: Issue -> IO ()
listMatches issue =