Module

Formless.Types.Form

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

#FormProxy Source

data FormProxy (form :: (Row Type -> Type) -> (Type -> Type -> Type -> Type) -> Type)

Create a proxy for your form type, for use with functions that generate records from form proxies.

Constructors

#InputField Source

newtype InputField error input output

A wrapper to represent only the input type. Requires that eq is defined for the input type in order to track dirty states.

Constructors

Instances

#OutputField Source

newtype OutputField error input output

A wrapper to represent only the output type. Used to represent form results at the end of validation.

Constructors

Instances

#U Source

data U e i o

Represents a unit value with the correct number of arguments; largely for internal use.

Constructors

#InputFunction Source

newtype InputFunction error input output

Represents modifications to input fields

Constructors

Instances

#FormField Source

newtype FormField e i o

The type that we need to record state across the form

Constructors

Instances

#FormFieldRow Source

type FormFieldRow error input output = (input :: input, result :: FormFieldResult error output, touched :: Boolean)

The row used for the FormField newtype and in lens type signatures

#ErrorType Source

type ErrorType error input output = error

A type synonym that lets you pick out just the error type from your form row.

#InputType Source

type InputType error input output = input

A type synonym that lets you pick out just the input type from your form row.

#OutputType Source

type OutputType error input output = output

A type synonym that lets you pick out just the output type from your form row.

#InputForm Source

type InputForm form = form Record InputField

A type synonym that represents a record with the input fields of a form.

#OutputForm Source

type OutputForm form = form Record OutputField

A type synonym that represents a record with the output fields of a form.