Module

Formless.Transform.Row

#mkInputFields

mkInputFields :: forall xs form inputs. RowToList inputs xs => Newtype (form Record InputField) (Record inputs) => MakeInputFieldsFromRow xs inputs inputs => form Record InputField

A function to transform a row of labels into a InputFields. This allows you to go directly from a custom form newtype to an inputs record without having to fill in any values. Requires that all members have an instance of the Initial type class (all monoidal values do by default, along with some other primitives).

#MakeInputFieldsFromRow

class MakeInputFieldsFromRow (xs :: RowList Type) (row :: Row Type) (to :: Row Type) | xs -> to where

The class that provides the Builder implementation to efficiently transform a row into a proper InputFields by wrapping it in newtypes and supplying initial values

Members

Instances

#SProxies

type SProxies form = forall xs row inputs. RowToList inputs xs => Newtype (form Record InputField) (Record inputs) => MakeSProxies xs row => Record row

A type to collect constraints necessary to apply to prove that a record of SProxies is compatible with your form type.

#mkSProxies

mkSProxies :: forall form xs inputs row. RowToList inputs xs => Newtype (form Record InputField) (Record inputs) => MakeSProxies xs row => Proxy form -> Record row

A helper function to produce a record of SProxies given a form spec, to save you the boilerplate of writing them all out.

#MakeSProxies

class MakeSProxies (xs :: RowList Type) (to :: Row Type) | xs -> to where

The class used to build up a new record of symbol proxies from an input row list.

Members

Instances

Modules