Skip to content

Commit 23e9257

Browse files
rvlKtorZ
authored andcommitted
Use shorter cross-compiler friendly HLint annotations
1 parent 95c37bc commit 23e9257

File tree

13 files changed

+16
-22
lines changed

13 files changed

+16
-22
lines changed

lib/core/src/Cardano/Byron/Codec/Cbor.hs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
-- need this for {-# HLINT ... #-}; see https://github.com/ndmitchell/hlint#ignoring-hints
2-
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
3-
41
{-# LANGUAGE DataKinds #-}
52
{-# LANGUAGE FlexibleContexts #-}
63
{-# LANGUAGE LambdaCase #-}
@@ -281,7 +278,7 @@ decodeTx = do
281278
_ <- decodeEmptyAttributes
282279
return (ins, outs)
283280

284-
{-# HLINT ignore decodeTxIn "Use <$>" #-}
281+
{- HLINT ignore decodeTxIn "Use <$>" -}
285282
decodeTxIn :: CBOR.Decoder s TxIn
286283
decodeTxIn = do
287284
_ <- CBOR.decodeListLenCanonicalOf 2
@@ -301,7 +298,7 @@ decodeTxIn = do
301298
tx <- Hash <$> CBOR.decodeBytes
302299
TxIn tx <$> CBOR.decodeWord32
303300

304-
{-# HLINT ignore decodeTxOut "Use <$>" #-}
301+
{- HLINT ignore decodeTxOut "Use <$>" -}
305302
decodeTxOut :: CBOR.Decoder s TxOut
306303
decodeTxOut = do
307304
_ <- CBOR.decodeListLenCanonicalOf 2

lib/core/src/Cardano/DB/Sqlite.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
{-# LANGUAGE TypeFamilies #-}
1414
{-# LANGUAGE UndecidableInstances #-}
1515

16-
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
17-
{-# HLINT ignore "Redundant flip" #-}
16+
{- HLINT ignore "Redundant flip" -}
1817

1918
-- |
2019
-- Copyright: © 2018-2020 IOHK

lib/core/src/Cardano/Pool/DB/Model.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ mReadSettings = get #settings
451451
-- `const` isn't more readable than lambdas. Our language is based on
452452
-- lambda calculus and we shouldn't feel ashamed to use them. They also
453453
-- have different strictness properties.
454-
{-# HLINT ignore mPutSettings "Use const" #-}
454+
{- HLINT ignore mPutSettings "Use const" -}
455455
mPutSettings
456456
:: Settings
457457
-> ModelOp ()

lib/core/src/Cardano/Pool/DB/Sqlite.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
{-# LANGUAGE TypeFamilies #-}
1515
{-# LANGUAGE UndecidableInstances #-}
1616

17-
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
18-
{-# HLINT ignore "Redundant flip" #-}
17+
{- HLINT ignore "Redundant flip" -}
1918

2019
-- |
2120
-- Copyright: © 2018-2020 IOHK

lib/core/src/Cardano/Wallet/DB/Sqlite.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
{-# LANGUAGE TypeFamilies #-}
1313
{-# LANGUAGE UndecidableInstances #-}
1414

15-
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
16-
{-# HLINT ignore "Redundant flip" #-}
15+
{- HLINT ignore "Redundant flip" -}
1716

1817
-- |
1918
-- Copyright: © 2018-2020 IOHK

lib/core/test/unit/Cardano/Byron/Codec/CborSpec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ import qualified Data.ByteArray as BA
5858
import qualified Data.ByteString as BS
5959
import qualified Data.ByteString.Lazy as BL
6060

61-
{-# ANN spec ("HLint: ignore Use head" :: String) #-}
61+
{- HLINT ignore spec "Use head" -}
6262

6363
spec :: Spec
6464
spec = do

lib/core/test/unit/Cardano/Wallet/DB/StateMachine.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ import qualified Test.QuickCheck as QC
229229
import qualified Test.StateMachine.Types as QSM
230230
import qualified Test.StateMachine.Types.Rank2 as Rank2
231231

232-
{-# ANN module ("HLint: ignore Unused LANGUAGE pragma" :: String) #-}
232+
{- HLINT ignore "Unused LANGUAGE pragma" -}
233233

234234
{-------------------------------------------------------------------------------
235235
Mock implementation
@@ -569,7 +569,7 @@ lockstep m@(Model _ ws) c (At resp) = Event
569569
Generator
570570
-------------------------------------------------------------------------------}
571571

572-
{-# ANN generator ("HLint: ignore Use ++" :: String) #-}
572+
{- HLINT ignore generator "Use ++" -}
573573
generator
574574
:: forall s. (Arbitrary (Wallet s), GenState s)
575575
=> Model s Symbolic

lib/core/test/unit/Cardano/Wallet/Primitive/CoinSelectionSpec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ import qualified Data.Map.Strict as Map
8484
import qualified Data.Set as Set
8585
import qualified Test.QuickCheck.Monadic as QC
8686

87-
{-# ANN module ("HLint: ignore Use <$>" :: String) #-}
87+
{- HLINT ignore "Use <$>" -}
8888

8989
spec :: Spec
9090
spec = do

lib/jormungandr/src/Cardano/Wallet/Jormungandr/Binary.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ maxNumberOfOutputs = 254
197197
-------------------------------------------------------------------------------}
198198

199199
-- Do-notation is favoured over applicative syntax for readability:
200-
{-# ANN module ("HLint: ignore Use <$>" :: String) #-}
200+
{- HLINT ignore "Use <$>" -}
201201

202202
data BlockHeader = BlockHeader
203203
{ version :: Word16

lib/jormungandr/test/integration/Cardano/Wallet/Jormungandr/NetworkSpec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ import qualified Cardano.Wallet.Jormungandr.Api.Client as Jormungandr
129129
import qualified Data.ByteString as BS
130130
import qualified Data.ByteString.Char8 as B8
131131

132-
{-# ANN spec ("HLint: ignore Use head" :: String) #-}
132+
{- HLINT ignore spec "Use head" -}
133133

134134
spec :: Spec
135135
spec = do

0 commit comments

Comments
 (0)