mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-26 20:02:27 +03:00
cln: hlint: Remove <|> and bimap warnings.
This commit is contained in:
parent
46b0745412
commit
435fbf001e
@ -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"}
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user