Skip to content

Commit

Permalink
Merge #2265
Browse files Browse the repository at this point in the history
2265: Disable the hlint `use const` warning. r=jonathanknowles a=jonathanknowles

# Issue Number

None. Discovered while reviewing issue #2249. See [comment](#2249 (comment)).

# Overview

This PR disables the hlint `use const` warning. (See related poll [here](https://input-output-rnd.slack.com/archives/GBT05825V/p1603435568043200).)

Co-authored-by: Jonathan Knowles <[email protected]>
  • Loading branch information
iohk-bors[bot] and jonathanknowles authored Oct 24, 2020
2 parents c8bcc59 + d567d63 commit 19a0bf6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
1 change: 1 addition & 0 deletions .hlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
- ignore: {name: "Monoid law, left identity"} # Using 'mempty' can be useful to vertically-align elements
- ignore: {name: "Use ?~"} # It's actually much clearer to do (.~ Just ...) than having to load yet-another-lens-operator
- ignore: {name: "Redundant multi-way if"} # Using this style might be appropriate given the circumstances.
- ignore: {name: "Use const"} # Sometimes using a lambda expression is simpler and clearer.

# Add custom hints for this project
#
Expand Down
4 changes: 0 additions & 4 deletions lib/core/src/Cardano/Pool/DB/Model.hs
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,6 @@ mReadSettings
:: ModelOp Settings
mReadSettings = get #settings

-- `const` isn't more readable than lambdas. Our language is based on
-- lambda calculus and we shouldn't feel ashamed to use them. They also
-- have different strictness properties.
{- HLINT ignore mPutSettings "Use const" -}
mPutSettings
:: Settings
-> ModelOp ()
Expand Down
1 change: 0 additions & 1 deletion lib/shelley/src/Cardano/Wallet/Shelley/Pools.hs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ newStakePoolLayer nl db@DBLayer {..} worker = do

-- In order to apply the settings, we have to restart the
-- metadata sync thread as well to avoid race conditions.
{- HLINT ignore "Use const" -}
_putSettings :: TVar ThreadId -> Settings -> IO ()
_putSettings tvTid settings = do
bracket
Expand Down

0 comments on commit 19a0bf6

Please sign in to comment.