Hlinting.
This commit is contained in:
parent
5f7983e1f8
commit
ecb405a5bc
@ -61,16 +61,16 @@ sendCommandLoop commandChan bot@Bot { .. } = do
|
||||
forM_ exs $ \(ex :: SomeException) ->
|
||||
errorM ("Error while formatting command: " ++ show cmd ++ "\nError: " ++ show ex)
|
||||
|
||||
when (not . null $ lines_) $
|
||||
unless (null lines_) $
|
||||
handle (\(e :: SomeException) -> do
|
||||
errorM ("Error while writing to connection: " ++ show e)
|
||||
closeMessageChannel commandChan) $ do
|
||||
closeMessageChannel commandChan) $
|
||||
forM_ lines_ $ \line -> do
|
||||
TF.hprint botSocket "{}\r\n" $ TF.Only line
|
||||
infoM . unpack $ "> " ++ line
|
||||
|
||||
commandChanClosed <- isClosedMessageChannel commandChan
|
||||
when (not commandChanClosed) $
|
||||
unless commandChanClosed $
|
||||
case fromMessage cmd of
|
||||
Just QuitCmd -> closeMessageChannel commandChan
|
||||
_ -> sendCommandLoop commandChan bot
|
||||
|
@ -7,7 +7,6 @@ import qualified Data.Text.Format as TF
|
||||
import qualified Data.Text.Format.Params as TF
|
||||
|
||||
import ClassyPrelude hiding ((</>), (<.>), FilePath, log)
|
||||
import Control.Exception.Lifted (mask_)
|
||||
import Data.Time (diffDays)
|
||||
import System.Directory (createDirectoryIfMissing, getModificationTime, copyFile, removeFile)
|
||||
import System.FilePath (FilePath, (</>), (<.>))
|
||||
|
Loading…
Reference in New Issue
Block a user