yesodweb / yesodweb.com-content

Content for the www.yesodweb.com site
http://www.yesodweb.com/
Other
67 stars 112 forks source link

Possible mismatch between text and code example #259

Closed eahlberg closed 3 years ago

eahlberg commented 3 years ago

I noticed a possible mismatch between the text and the code example under Subsite: handlers. The paragraph which starts with The call to runInputGet is a little more subtle mentions lift, but lift is not used in the line I think it refers to, namely:

body <- runInputGet $ ireq textField "message"

It seems like a previous version of the example used lift, but I'm not sure why it was dropped.

I think it'd be beneficial if the usage of lift was either re-introduced or if the paragraph was dropped. However, if the paragraph is dropped, it might also be the case that the RenderMessage constraint on the YesodChat typeclass is unnecessary, meaning that there are more code examples that might need to be updated.

Any thoughts? I'd be glad to add a PR with the requested change.

snoyberg commented 3 years ago

The RenderMessage constraint is still necessary, but in Yesod 1.6 the API changed so that the lifts aren't necessary. A PR to remove the paragraph would be great!