Module

Formless.Transform.Row

Package
purescript-formless-aj
Repository
ajnsit/purescript-formless-independent

#mkInputFields Source

mkInputFields :: forall inputs form xs. RowToList inputs xs => Newtype (form Record InputField) (Record inputs) => MakeInputFieldsFromRow xs inputs inputs => FormProxy form -> 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 Source

class MakeInputFieldsFromRow (xs :: RowList) (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 Source

type SProxies form = forall inputs row xs. 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 Source

mkSProxies :: forall row inputs xs form. RowToList inputs xs => Newtype (form Record InputField) (Record inputs) => MakeSProxies xs row => FormProxy 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 Source

class MakeSProxies (xs :: RowList) (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