Skip to content

Commit

Permalink
hlint refactor: Redundant $
Browse files Browse the repository at this point in the history
  • Loading branch information
flandweber committed May 21, 2024
1 parent 8abd0da commit 8d7d6d6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/Niv/Cli.hs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ cmdAdd cmd packageName attrs = do
case eFinalSpec of
Left e -> li (abortUpdateFailed [(packageName, e)])
Right finalSpec -> do
say $ "Writing new sources file"
say "Writing new sources file"
li $
setSources fsj $
Sources $
Expand Down Expand Up @@ -393,7 +393,7 @@ cmdShow = \case
Nothing -> do
fsj <- getFindSourcesJson
sources <- unSources <$> li (getSources fsj)
forWithKeyM_ sources $ showPackage
forWithKeyM_ sources showPackage

showPackage :: (MonadIO io) => PackageName -> PackageSpec -> io ()
showPackage (PackageName pname) (PackageSpec spec) = do
Expand Down Expand Up @@ -483,7 +483,7 @@ cmdUpdate = \case
-- | pretty much tryEvalUpdate but we might issue some warnings first
doUpdate :: Attrs -> Cmd -> IO (Either SomeException Attrs)
doUpdate attrs cmd = do
forM_ (extraLogs cmd attrs) $ tsay
forM_ (extraLogs cmd attrs) tsay
tryEvalUpdate attrs (updateCmd cmd)

partitionEithersHMS ::
Expand Down
3 changes: 1 addition & 2 deletions src/Niv/GitHub/API.hs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ defaultRequest (map T.encodeUtf8 -> parts) = do
$ HTTP.addRequestHeader "accept" "application/vnd.github.v3+json"
$ HTTP.setRequestSecure githubSecure
$ HTTP.setRequestHost (T.encodeUtf8 githubApiHost)
$ HTTP.setRequestPort githubApiPort
$ HTTP.defaultRequest
$ HTTP.setRequestPort githubApiPort HTTP.defaultRequest

-- | Get the latest revision for owner, repo and branch.
-- TODO: explain no error handling
Expand Down
4 changes: 2 additions & 2 deletions src/Niv/Update/Test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ isNotTooEager = do
let f1 = proc () -> do
run (const $ error "IO is too eager (f1)") -< pure ()
useOrSet "foo" -< "foo"
void $ (execUpdate attrs f :: IO (Box T.Text))
void $ (execUpdate attrs f1 :: IO (Box T.Text))
void (execUpdate attrs f :: IO (Box T.Text))
void (execUpdate attrs f1 :: IO (Box T.Text))
where
attrs = HMS.singleton "foo" (Locked, "right")

Expand Down

0 comments on commit 8d7d6d6

Please sign in to comment.