-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Conversation
There was a problem hiding this 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.
There was a problem hiding this 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 |
There was a problem hiding this comment.
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... 😞
src/Relude/Lifted/Env.hs
Outdated
@@ -0,0 +1,41 @@ | |||
{- | | |||
Copyright: (c) 2018-2020 Kowainik |
There was a problem hiding this comment.
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 🙂
Copyright: (c) 2018-2020 Kowainik | |
Copyright: (c) 2020 Kowainik |
lookupEnv :: MonadIO m => String -> m (Maybe String) | ||
lookupEnv = liftIO . ENV.lookupEnv | ||
{-# SPECIALIZE lookupEnv :: String -> IO (Maybe String) #-} | ||
{-# INLINE lookupEnv #-} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice and clean implementation! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! 💯
Resolves #305
Checklist:
HLint
hlint.dhall
accordingly to my changes (add new rules for the new imports, remove old ones, when they are outdated, etc.)..hlint.yaml
file (see this instructions).General
stylish-haskell
file.[ci skip]
text to the docs-only related commit's name.