-
Notifications
You must be signed in to change notification settings - Fork 7
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
Restricting maybewires when inserting and updating #57
Comments
With this you don't need to add a type signature around |
Ah this would be very helpful! What are the consequences for the API consumer? Does it force them to enable any extensions? |
Nope! |
Sounds very cool. Is it possible to substitute |
I thought no, but it seems like it works. It's requires replacing |
Oh scratch the last part, it's possible to change it on just the top level, just forgot to replace one of the |
You still need to type all insertUser = myInsert userTable $ makeMaybeExpr u
where
u :: To Maybe User
u = User Nothing (Just 1) |
Using the
To
type family discussed in #11 I've specialized inserts and updates to beThis improves type inference and seems to always be what I want. Assuming
To
would make it into opaleye, is there any reason to not restrict these functions?The text was updated successfully, but these errors were encountered: