|
|
|
|
|
by magicalhippo
1987 days ago
|
|
You can bind parameters though in Haskell, no? I'm used to Boost.Bind and similar, so was thinking a scenario where you bind the database connection parameter and pass the resulting function to something else. As the sibling pointed out though, I now get that the result would be "tainted" so to speak. |
|
In this case you can think of a monad a bit like a computational context. If one is not present, you simply cannot[^1] instruct a Haskell program to perform those operations in a type safe way even if you give it a valid database connection identifier.
[1] Well, you can, but if you do you're explicitly taking away all the safeguards that Haskell introduces, and it would never pass code review.