Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to unliftio and lts-11.1 #83

Merged
merged 1 commit into from
Mar 26, 2018
Merged

Conversation

donatello
Copy link
Member

@donatello donatello commented Mar 23, 2018

  • Also add .stylish-haskell.yaml
  • Re-implements limitedMapConcurrently using STM
  • Dependencies clean up in cabal file
  • Fix shadow warnings and other build warnings

Copy link
Member

@krisis krisis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except for the one comment in limitedMapConcurrently rest of the changes LGTM. 👍

contentTypeMay resp = lookupHeader Hdr.hContentType $ NC.responseHeaders resp

-- Similar to mapConcurrently but limits the number of threads that
-- can run using a quantity semaphore.
limitedMapConcurrently :: (MonadIO m, R.MonadBaseControl IO m)
limitedMapConcurrently :: MonadUnliftIO m
=> Int -> (t -> m a) -> [t] -> m [a]
limitedMapConcurrently count act args = do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to handle the case where count could be zero. One way to do it is,
limitedMapConcurrently 0 _ _ = return []

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

- Also add .stylish-haskell.yaml
- Re-implements `limitedMapConcurrently` using STM
- Dependencies clean up in cabal file
- Fix shadow warnings and other build warnings
@donatello donatello merged commit 51b3e51 into minio:master Mar 26, 2018
@donatello donatello deleted the unliftio branch March 26, 2018 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants