-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add heterogeneous
helper functions and restructure internals
#33
Conversation
src/Spec/Retrieve.purs
Outdated
|
||
-- | A type representing retrieving all of a particular field with the field's | ||
-- | constructor name. For internal use. | ||
type GetAll f = |
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.
@dariooddenino Your version of this is prettier and the type signatures are more immediately obvious in explaining what the function does (getInputs :: FormFieldGetFields "input"
). However, I'm trying to minimize the number of constraints (especially RowToList
ones) wherever possible for compile-time performance reasons. This version is less nice, but has fewer constraints.
…ucture modules to more accurately reflect names and uses of functions and for clarity.
* Added helper queries for all public queries. Added SetAll and ModifyAll functions. Broke something... * Fix instances * Update examples. Rename replaceInputs to initialize to better reflect its purpose and function. * Fix formatting * Add wrapInputFunctions helper function. Add documentation to wrap* and unwrap* helpers.
Add ability to set or modify input values, instead of only set.
Updates to support |
Will merge and release 0.3.0 on Monday, with a migration guide, unless there are any objections. (cc: @whoadave @crcornwell @dariooddenino) |
What does this pull request do?
Provides a solution for #18 and #19 by adding helper functions based on
heterogeneous
. Also restructures some internals and classes to minimize the number of constraints that exist on the Formless component to save some compile times.Unfortunately, pending some resolution in the Heterogeneous library (see: natefaubion/purescript-heterogeneous#2), no heterogeneous constraints can be placed on the Formless component without breaking the library, so all changes directly on the component have had to be reverted.
Still, a number of new helper functions are available and the exercise cleaned up the internals of the library.
How should this be manually tested?
Verify that the example components still work as expected.
Other Notes:
This PR changes the namespaces of several functions, and if users are not importing from the main Formless module, they will see breaking changes. However, existing functionality has been maintained. If users are importing from the main Formless module, then this change will have no effect on their code.