File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11- warn : {lhs: map, rhs: fmap, name: Use fmap}
2+ - warn : {lhs: a ++ b, rhs: a <> b, name: Use <>}
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ CI (`.github/workflows/ci.yml`) runs all of the above; keep it green.
1313
1414## Style
1515
16- - ` fmap ` over ` map `
16+ - ` fmap ` over ` map ` , ` <> ` over ` ++ ` (enforced by hlint)
1717- curried constraints: ` Read a => Ord a => a ` , not ` (Read a, Ord a) => a ` ;
1818 not enforced by tooling; constraint aliases such as ` CLIEffects ` stay tuples
1919- ` -Wredundant-constraints ` on: only add ` Show e ` for ` throwError ` where needed
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ argParser cmdParser =
4747 ( short ' l'
4848 <> long " log-level"
4949 <> metavar " LEVEL"
50- <> help (" Log level: " ++ intercalate " , " (fmap fst logLevels))
50+ <> help (" Log level: " <> intercalate " , " (fmap fst logLevels))
5151 )
5252 )
5353 <*> switch (short ' d' <> long " debug" <> help " Enable debug output (overruled by -l)" )
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ data CLIError
1313
1414-- | @since 0.1.0.0
1515displayCLIError :: CLIError -> String
16- displayCLIError (InputError s) = " input error: " ++ s
17- displayCLIError (NotFoundError s) = " not found: " ++ s
18- displayCLIError (NotImplemented s) = " not implemented: " ++ s
16+ displayCLIError (InputError s) = " input error: " <> s
17+ displayCLIError (NotFoundError s) = " not found: " <> s
18+ displayCLIError (NotImplemented s) = " not implemented: " <> s
1919displayCLIError (UserCanceled Nothing ) = " user canceled"
20- displayCLIError (UserCanceled (Just s)) = " user canceled: " ++ s
20+ displayCLIError (UserCanceled (Just s)) = " user canceled: " <> s
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ printLines = printOutput . unlines
5050-- | @since 0.1.0.0
5151prompt :: IOE :> es => Maybe String -> Eff es String
5252prompt p = liftIO $ do
53- hPutStr stderr (fromMaybe " " p ++ " > " )
53+ hPutStr stderr (fromMaybe " " p <> " > " )
5454 hFlush stderr
5555 getLine
5656
@@ -91,7 +91,7 @@ chooseItem
9191 :: Error CLIError :> es
9292 => IOE :> es
9393 => String -> [String ] -> (a -> [String ]) -> [a ] -> Eff es a
94- chooseItem name _ _ [] = throwError (NotFoundError (" no item found for " ++ name))
94+ chooseItem name _ _ [] = throwError (NotFoundError (" no item found for " <> name))
9595chooseItem _ _ _ [x] = pure x
9696chooseItem name headers row xs = do
9797 let hs = " #" : headers
Original file line number Diff line number Diff line change @@ -34,6 +34,6 @@ sleep n = do
3434-- | @since 0.1.0.0
3535sleepUntil :: IOE :> es => Logger :> es => LocalTime -> Eff es ()
3636sleepUntil t = do
37- logInfoN (T. pack (" sleeping until " ++ formatTime defaultTimeLocale " %R" t))
37+ logInfoN (T. pack (" sleeping until " <> formatTime defaultTimeLocale " %R" t))
3838 now <- getLocalTime
3939 sleep . ceiling . nominalDiffTimeToSeconds $ diffLocalTime t now
You can’t perform that action at this time.
0 commit comments