Skip to content

Commit fcfc9a3

Browse files
committed
Remove remaining in-source HLINT pragmas
1 parent d2b700d commit fcfc9a3

File tree

9 files changed

+4
-22
lines changed

9 files changed

+4
-22
lines changed

.hlint.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@
6060
# Allow snake_case naming in test modules (following Haskell test property convention)
6161
- ignore: {name: Use camelCase, within: [Test.Cardano.Api.**, Test.Golden.Cardano.Api.**]}
6262

63+
- ignore: {name: Eta reduce}
6364
- ignore: {name: Use + directly}
65+
- ignore: {name: Use fmap}
6466

6567
# Define some custom infix operators
6668
# - fixity: infixr 3 ~^#^~

cardano-api/src/Cardano/Api/Address.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
{-# LANGUAGE TypeApplications #-}
1010
{-# LANGUAGE TypeFamilies #-}
1111

12-
{- HLINT ignore "Avoid lambda using `infix`" -}
13-
1412
-- | Cardano addresses: payment and stake addresses.
1513
module Cardano.Api.Address
1614
( -- * Payment addresses

cardano-api/src/Cardano/Api/Block.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ import Data.ByteString.Short qualified as SBS
8282
import Data.Foldable (Foldable (toList))
8383
import Data.Text (Text)
8484

85-
{- HLINT ignore "Use lambda" -}
86-
{- HLINT ignore "Use lambda-case" -}
87-
8885
-- ----------------------------------------------------------------------------
8986
-- Blocks in an era
9087
--

cardano-api/src/Cardano/Api/Byron/Internal/Proposal.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,11 @@ import Ouroboros.Consensus.Byron.Ledger.Mempool qualified as Mempool
5757

5858
import Data.ByteString (ByteString)
5959
import Data.ByteString.Lazy qualified as LB
60+
import Data.Functor (void)
6061
import Data.Map.Strict qualified as M
6162
import Data.Word
6263
import Numeric.Natural
6364

64-
{- HLINT ignore "Use void" -}
65-
6665
-- | Byron era update proposal
6766
newtype ByronUpdateProposal
6867
= ByronUpdateProposal {unByronUpdateProposal :: AProposal ByteString}
@@ -193,7 +192,7 @@ instance HasTypeProxy ByronVote where
193192
proxyToAsType _ = AsByronVote
194193

195194
instance SerialiseAsRawBytes ByronVote where
196-
serialiseToRawBytes (ByronVote vote) = Binary.serialize' $ fmap (const ()) vote
195+
serialiseToRawBytes (ByronVote vote) = Binary.serialize' $ void vote
197196
deserialiseFromRawBytes AsByronVote bs =
198197
let lBs = LB.fromStrict bs
199198
in case Binary.decodeFull lBs of

cardano-api/src/Cardano/Api/LedgerState.hs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
{-# LANGUAGE TypeApplications #-}
1212
{-# LANGUAGE TypeOperators #-}
1313

14-
{- HLINT ignore "Redundant fmap" -}
15-
1614
module Cardano.Api.LedgerState
1715
( -- * Initialization / Accumulation
1816
envSecurityParam
@@ -996,8 +994,6 @@ extractHistory historySeq =
996994
getBlockNo :: WithOrigin BlockInMode -> BlockNo
997995
getBlockNo = Consensus.withOrigin (BlockNo 0) (blockNo . toConsensusBlock)
998996

999-
{- HLINT ignore chainSyncClientPipelinedWithLedgerState "Use fmap" -}
1000-
1001997
-- | A history of k (security parameter) recent ledger states. The head is the
1002998
-- most recent item. Elements are:
1003999
--

cardano-api/src/Cardano/Api/Network/IPC/Internal/Monad.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ import Control.Monad.IO.Class
2424
import Control.Monad.Reader
2525
import Control.Monad.Trans.Cont
2626

27-
{- HLINT ignore "Use const" -}
28-
{- HLINT ignore "Use let" -}
29-
3027
-- | Monadic type for constructing local state query expressions.
3128
--
3229
-- Use 'queryExpr' in a do block to construct queries of this type and convert

cardano-api/src/Cardano/Api/Plutus/Internal/Script.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
{-# LANGUAGE TypeOperators #-}
1616
{-# LANGUAGE UndecidableInstances #-}
1717

18-
{- HLINT ignore "Avoid lambda using `infix`" -}
19-
{- HLINT ignore "Use section" -}
20-
2118
module Cardano.Api.Plutus.Internal.Script
2219
( -- * Languages
2320
SimpleScript'

cardano-api/src/Cardano/Api/ProtocolParameters.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
{-# OPTIONS_GHC -Wno-orphans #-}
2121
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
2222

23-
{-# HLINT ignore "Redundant ==" #-}
24-
2523
-- | The various Cardano protocol parameters, including:
2624
--
2725
-- * the current values of updatable protocol parameters: 'ProtocolParameters'

cardano-api/src/Cardano/Api/Tx/Internal/Body/Lens.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{-# LANGUAGE DataKinds #-}
22
{-# LANGUAGE RankNTypes #-}
33

4-
{- HLINT ignore "Eta reduce" -}
5-
64
module Cardano.Api.Tx.Internal.Body.Lens
75
( -- * Types
86
LedgerTxBody (..)

0 commit comments

Comments
 (0)