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

add lifted Env functions #325

Merged
merged 2 commits into from
Aug 23, 2020
Merged

Conversation

rektrex
Copy link
Collaborator

@rektrex rektrex commented Aug 14, 2020

Resolves #305

Checklist:

HLint

  • I've changed the exposed interface (add new reexports, remove reexports, rename reexported things, etc.).
    • I've updated hlint.dhall accordingly to my changes (add new rules for the new imports, remove old ones, when they are outdated, etc.).
    • I've generated the new .hlint.yaml file (see this instructions).

General

  • I've updated the CHANGELOG with the short description of my latest changes.
  • All new and existing tests pass.
  • I keep the code style used in the files I've changed (see style-guide for more details).
  • I've used the stylish-haskell file.
  • My change requires the documentation updates.
    • I've updated the documentation accordingly.
  • I've added the [ci skip] text to the docs-only related commit's name.

Copy link
Contributor

@hint-man hint-man bot left a comment

Choose a reason for hiding this comment

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

There is no place for me here... I will choose the truth I like.

@chshersh chshersh added the reexport Reexport something new label Aug 21, 2020
Copy link
Contributor

@chshersh chshersh left a comment

Choose a reason for hiding this comment

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

Looks great! Only a few suggestions 🙂

.hlint.yaml Outdated
@@ -1814,7 +1814,7 @@
lhs: Data.Function.on
name: "Use 'on' from Relude"
note: "'on' is already exported from Relude"
rhs: "on"
rhs: on
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you edit this manually back to "on"? This is happening because of the following issue in dhall-to-yaml tool:

Maybe it is already fixed in the latest version of dhall-json and update to the latest version won't update it automatically, but for now we need to change this line back to quoted string... 😞

hlint/hlint.dhall Show resolved Hide resolved
@@ -0,0 +1,41 @@
{- |
Copyright: (c) 2018-2020 Kowainik
Copy link
Contributor

Choose a reason for hiding this comment

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

This module created in this year, so we can leave only 2020 in here 🙂

Suggested change
Copyright: (c) 2018-2020 Kowainik
Copyright: (c) 2020 Kowainik

Comment on lines +38 to +41
lookupEnv :: MonadIO m => String -> m (Maybe String)
lookupEnv = liftIO . ENV.lookupEnv
{-# SPECIALIZE lookupEnv :: String -> IO (Maybe String) #-}
{-# INLINE lookupEnv #-}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice and clean implementation! 👍

Copy link
Member

@vrom911 vrom911 left a comment

Choose a reason for hiding this comment

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

Great! 💯

@vrom911 vrom911 merged commit de69df4 into kowainik:master Aug 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reexport Reexport something new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create 'Relude.Lifted.Env' module
3 participants