Skip to content

Commit 8d0c84c

Browse files
committed
(#599) Fix hindent remarks
1 parent f462810 commit 8d0c84c

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/Bot.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ shuffle t = fromMaybe t $ headMay $ drop 100 $ iterate swapDeck t
565565

566566
replaceAt :: Int -> T.Text -> T.Text -> T.Text
567567
replaceAt i rep input =
568-
fromMaybe input $ fmap (T.append (T.append left rep) . snd) $ T.uncons right
568+
maybe input (T.append (T.append left rep) . snd) (T.uncons right)
569569
where
570570
(left, right) = T.splitAt i input
571571

src/MarkovMain.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ import Markov
1111
import Safe
1212
import System.Environment
1313
import Text.InterpolatedString.QM
14-
import Data.Maybe
1514

1615
asteriskCorrectionFilter :: [T.Text] -> [T.Text]
1716
asteriskCorrectionFilter = filter ((/= '*') . T.last)
1817

1918
firstIsNot :: Char -> T.Text -> Bool
20-
firstIsNot x = fromMaybe False . fmap ((/= x) . fst) . T.uncons
19+
firstIsNot x = maybe False ((/= x) . fst) . T.uncons
2120

2221
mentionsFilter :: [T.Text] -> [T.Text]
2322
mentionsFilter =

test/Bot/ExprTest.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{-# LANGUAGE OverloadedStrings #-}
2+
23
module Bot.ExprTest where
34

4-
import Test.HUnit
55
import Bot.Expr
6+
import Test.HUnit
67

78
-- TODO(#801): Let's fuzz Bot.Expr.exprs to make sure that it has expected behaviour
89
exprsTest :: Test
@@ -50,7 +51,7 @@ exprsTest =
5051
, VarExpr "k"
5152
, TextExpr " baz ()"
5253
]))
53-
, ("%f(%x)", Right ("",[FunCallExpr "f" [VarExpr "x"]]))
54+
, ("%f(%x)", Right ("", [FunCallExpr "f" [VarExpr "x"]]))
5455
, ( "\"hello %x world\""
5556
, Right ("", [TextExpr "\"hello ", VarExpr "x", TextExpr " world\""]))
5657
]

0 commit comments

Comments
 (0)