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

Docs and examples contain outdated references to runIOE #27

Open
btubbs opened this issue Jul 1, 2014 · 1 comment
Open

Docs and examples contain outdated references to runIOE #27

btubbs opened this issue Jul 1, 2014 · 1 comment

Comments

@btubbs
Copy link

btubbs commented Jul 1, 2014

runIOE is all over the docs, examples, and comments, but no longer in the code. As someone new to this library, and still fairly new to Haskell, this leads to a lot of frustration.

If you can show me the new recommended way to make a connection, I'll grep through the codebase, update the examples, and send a pull request.

@dschalk
Copy link

dschalk commented Nov 5, 2014

As you probably discovered, "runIOE" was still present in the final version mongoDB 1 (the "1" series ended with version "1.5"), but was gone in version "2.0" and hasn't reappeared. Hackage stated its type as "runIOE :: ErrorT IOError IO a -> IO aSource" and commented, :"Run action while catching explicit error and rethrowing in IO monad."

I am experimenting with mongoDB this week and I haven't encountered any problems with the published examples when I just leave out "runIOE"; for example, by changing "pipe <- runIOE $ connect $ . . ." to "pipe <- connect $ . . ."

I doubt that there is a new recommended way to make a connection. I don't think that "runIOE" was ever declared to be deprecated. Updating the examples to make them compileable would be a valuable contribution to the Haskell community. People who are curious about Haskell aren't likely to study code that doesn't run, or to stick with a language whose ecosphere is so littered with example code that doesn't work. I'll raise the issue of the non-compiling tutorial code at mongodb/mongoDB-haskell on Github. Somebody should tell the author of Haskell Data Analysis Cookbook that he got blindsided by the change, and his book went to press with a dud mongodb example.

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

No branches or pull requests

2 participants