enfF does not suspend effect of loading from environment
Closed this issue · 1 comments
I noticed that reading in config with propF
and argF
require instances of Sync
in order to suspend side-effects properly, but envF
does not. It only seems to require Applicative
, and as a result it seems that the side-effect of reading from the environment is not deferred as expected, merely lifted into F
after the fact.
Was this an intentional design choice? If not, I can work on a quick an MR to fix it. Also, is there a use case for an env/prop/argF
that does not depend on Sync
? Maybe this could be solved by separate APIs for lifting to F
and supending in F
. Let me know what you think, and thanks in advance for reading this issue.
Whoops, guess I missed this in the docs:
(Note that envF is merely a convenience method which lifts the value into F without suspending, since environment variables are immutable.)
Closing as I am apparently blind. Sorry!