-
Notifications
You must be signed in to change notification settings - Fork 260
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
Provide updateActionModify API in AutoUpdate #547
Conversation
Travis builds failed due to (at least) missing imports. |
How did that happen? Why would it compile for me? |
You're probably using a newer version of GHC. On Wed, May 4, 2016, 2:11 PM Naren Sundar notifications@github.com wrote:
|
Right. I am using 7.10.3 and the Travis build doesn't show the missing import for |
I guess I'll just not use |
By adding the missing import statement. On Wed, May 4, 2016, 2:18 PM Naren Sundar notifications@github.com wrote:
|
Adding the import statement raises the complaint
Is that okay? |
It's OK. The usual solution is to use CPP to make the import conditional. On Wed, May 4, 2016, 2:23 PM Naren Sundar notifications@github.com wrote:
|
Sorry, I could only find one example of
|
I'm on my phone right now so I can't find an example myself, but there On Wed, May 4, 2016, 2:29 PM Naren Sundar notifications@github.com wrote:
|
@@ -90,6 +92,11 @@ data UpdateSettings a = UpdateSettings | |||
-- Default: does nothing. | |||
-- | |||
-- @since 0.1.0 | |||
, updateActionModify :: Maybe (a -> IO a) | |||
-- ^ Optional action to be performed to get the current value | |||
-- and updating it if necessary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence switches tense—I think you want "to get the current value and update it if necessary."
Looks like there are some auto-update related compiler errors in the latest Travis results, btw: https://travis-ci.org/yesodweb/wai/jobs/127737868 |
It looks like this change cannot be made without breaking the API. So, this error
happens because in the use above |
That's unfortunate. I don't see a way of making this happen then. |
There's another approach that could be taken I think: add a new function |
I think this is good to merge I think |
Thanks! |
Fixes #535