We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This function is introduced in the following blog post and helps with optimizing Haskell code:
It has the following defintion:
etaReaderT :: ReaderT r m a -> ReaderT r m a etaReaderT = ReaderT . oneShot . runReaderT
It can be used if the code like on the snippet below is called in a loop multiple times:
step :: Instr -> ReaderT Config IO Result step e = case e of Add -> do stuff … Del -> do stuff …
You just do:
step :: Instr -> ReaderT Config IO Result step e = etaReaderT $ case e of Add -> … do stuff … Del -> … do stuff …
The text was updated successfully, but these errors were encountered:
[#233] Add 'etaReaderT' function
062533c
Resolves #233
[#233] Add 'etaReaderT' function (#272)
57be608
* [#233] Add 'etaReaderT' function Resolves #233 * Update src/Relude/Monad/Trans.hs Co-authored-by: Veronika Romashkina <vrom911@gmail.com> * Use CPP for etaReaderT Co-authored-by: Veronika Romashkina <vrom911@gmail.com>
chshersh
Successfully merging a pull request may close this issue.
This function is introduced in the following blog post and helps with optimizing Haskell code:
It has the following defintion:
It can be used if the code like on the snippet below is called in a loop multiple times:
You just do:
The text was updated successfully, but these errors were encountered: