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

Practical exercise for Church encoding #4

Closed
yaitskov opened this issue Sep 17, 2022 · 3 comments
Closed

Practical exercise for Church encoding #4

yaitskov opened this issue Sep 17, 2022 · 3 comments

Comments

@yaitskov
Copy link

Hi,

I wanted to improve error reporting in beam library, through a runtime pluggable raw row logger, and realized that the library is using Church monad.

The library is popular meanwhile Church monad is not, so implementing following feature might be a good exercise for the book.

haskell-beam/beam#638

@graninas
Copy link
Owner

Hi, thank you for your comment!

I didn't get what exactly feature you're referencing to. The code you're presenting is not familiar to me

@yaitskov
Copy link
Author

Beam library, in case of row conversion error, doesn't log raw row or at least a row primary key, only column number. If query is select all it is hard to guess what went wrong (needle in a haystack), because developer has to fix bug without a sample reproducing the bug. So he has to spend extra time for adding extra logging to beam, rebuilding it. All this takes time. For production such silence might be good, but not all tables are equally sensitive. For development is absolutely a plus to have such feature out of the box. So logging row data must be adjustable in runtime => function doing that must be a part of monad context.

I will write an update once / if I succeed in this endeavor.

@graninas
Copy link
Owner

@yaitskov Good luck! It's true that it has some flaws in terms of debugging and logging.

The beam library is not the best one for sure, and I'd rather argue to avoid it if possible though. I'm kind of ambivalent about having it in my book, but I don't plan to replace it for now - no need and no time

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