-
Notifications
You must be signed in to change notification settings - Fork 42
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
FromForm and ToForm instances for (,) and Either #91
Comments
@wraithm not sure, do you have a use case in mind? |
The specific example is that I have a form for creating groups of users, and then I have a form for creating users. For certain kinds of groups, I need a form with a "root" user for that group, so I just use a tuple of the basic group form and the new user form for those kinds of group forms. So, I have two forms on two separate pages, and then I have a third form that is basically just both of those two forms on the same form. Of course, I could make a new data type with a new instance, but it was very convenient to use a tuple, and I was surprised to find that this instance didn't already exist. Also, you could have an Either version of this as well, but the tuple case is what I used for my specific problem here. |
Question: can corresponding |
Yes, you can definitely write a ToForm instance for both (,) and Either.
The semantics of toForm after fromForm and vice versa would maybe be a
little weird, but I don't think that matters very much.
…On Mon, Apr 8, 2019, 15:45 Oleg Grenrus ***@***.***> wrote:
Question: can corresponding ToForm be written? If it can, then I don't
see downsides.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#91 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABcV0SegJ6vJZS5Btoyn-y_yoErbISt3ks5ve6pbgaJpZM4cd41c>
.
|
I think we can assume (and mention that in instance haddocks) that forms "read/write" disjoint field sets. |
Does it make sense to have:
and ditto for Either?
The text was updated successfully, but these errors were encountered: