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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[persistent-mysql] Rename SomeField type to HandleUpdateCollision #760

Merged
merged 5 commits into from Feb 1, 2018

Conversation

Projects
None yet
3 participants
@parsonsmatt
Contributor

parsonsmatt commented Dec 17, 2017

I want to get this in before 3.0 馃槃

SomeField worked as a name before the responsibility of the type grew. Renaming it makes it more clear what it does and what it is for. Hiding the constructors allows us to add additional combinators without them being breaking changes -- I want to add copyUnlessIn, modifyUsing and possibly others at some point.

I'm not 100% on the new type alias and pattern constructor for SomeField. They'll prevent it from breaking with a compile error and instead issue a deprecation notice for migration, which is helpful, but also extends the amount of backwards compatibility cruft we have to carry around.

@parsonsmatt

This comment has been minimized.

Contributor

parsonsmatt commented Dec 17, 2017

OK, so the pattern synonym stuff is breaking with earlier GHCs (no type signatures on 7.8, can't export related pattern synonym on 7.10). I can write CPP to fix that, but that'll require some multiline string literals to be rewritten.

@MaxGabriel

This comment has been minimized.

Member

MaxGabriel commented Dec 18, 2017

I don't think it's required that we have a breaking API change on persistent-mysql, but the name HandleUpdateCollision/CopyField naming is a hundred times more clear, so I'm fine with it.

@snoyberg

This comment has been minimized.

Member

snoyberg commented Jan 16, 2018

Merged to the newer-conduit branch, part of PR #773

@snoyberg snoyberg merged commit c882203 into yesodweb:master Feb 1, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment