cln: hlint: Remove <|> and bimap warnings.

This commit is contained in:
Stephen Morgan 2021-08-16 15:44:42 +10:00 committed by Simon Michael
parent 46b0745412
commit 435fbf001e
3 changed files with 3 additions and 7 deletions

View File

@ -47,7 +47,6 @@
- ignore: {name: "Use zipWith"}
- ignore: {name: "Replace case with maybe"}
- ignore: {name: "Avoid lambda using `infix`"}
- ignore: {name: "Use <|>"}
- ignore: {name: "Use zip"}
- ignore: {name: "Functor law"}
- ignore: {name: "Missing NOINLINE pragma"}
@ -56,7 +55,6 @@
- ignore: {name: "Redundant flip"}
- ignore: {name: "Use replicate"}
- ignore: {name: "Use void"}
- ignore: {name: "Use bimap"}
- ignore: {name: "Use elemIndex"}
- ignore: {name: "Use =="}
- ignore: {name: "Use lambda-case"}

View File

@ -341,10 +341,7 @@ accountdirectivep = do
-- an account type may have been set by account type code or a tag;
-- the latter takes precedence
let
mtypecode' :: Maybe Text = maybe
(T.singleton <$> mtypecode)
Just
$ lookup accountTypeTagName tags
mtypecode' :: Maybe Text = lookup accountTypeTagName tags <|> (T.singleton <$> mtypecode)
metype = parseAccountTypeCode <$> mtypecode'
-- update the journal

View File

@ -24,6 +24,7 @@ module Text.Tabular.AsciiWide
, concatTables
) where
import Data.Bifunctor (bimap)
import Data.Maybe (fromMaybe)
import Data.Default (Default(..))
import Data.List (intersperse, transpose)
@ -94,7 +95,7 @@ renderTableB :: TableOpts -- ^ Options controlling Table rendering
-> (a -> Cell) -- ^ Function determining the string and width of a cell
-> Table rh ch a
-> Builder
renderTableB topts fr fc f = renderTableByRowsB topts (fmap fc) (\(rh, as) -> (fr rh, fmap f as))
renderTableB topts fr fc f = renderTableByRowsB topts (fmap fc) $ bimap fr (fmap f)
-- | A version of renderTable that operates on rows (including the 'row' of
-- column headers) and returns the underlying Builder.