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

Use MonadHandler constraint #3

Merged
merged 1 commit into from
Jun 18, 2017
Merged

Conversation

felixSchl
Copy link
Contributor

This removes the hard dependency on running in IO and instead requires to run in any m that has a MonadHandler instance. Fixes #2.

@geraldus
Copy link
Owner

@felixSchl Thanks!
I never seen several => going one after another. Is it another way to write several constraints without parentheses and commas?

@felixSchl
Copy link
Contributor Author

Yeah both ways works, but this one stacks nicely. Do you want me to change it?

@felixSchl
Copy link
Contributor Author

I'll change it because i had another look over the code and I see you use the other style in other places

@geraldus
Copy link
Owner

Merged, thanks @felixSchl !

I'll bump version and push it to Hackage soon.

@skinner33
Copy link

I'm rather unsure if this is necessary. I have to admit that I do not have a test for a yesod subsite, yet IO is not needed anywhere. A simple Monad m typeclass is sufficient. Especially as I was unable to add MonadHandler IO into my applications (in the end, mkYesodDispatch throws some template errors).

I'm opening another PR (#4) to change this, it would be awesome if you could verify if this also works for subsites.

@skinner33 skinner33 mentioned this pull request Jul 26, 2017
@geraldus
Copy link
Owner

@felixSchl can you please check if proposed Monad constraint work for subsites?

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

Successfully merging this pull request may close these issues.

3 participants