optional (Maybe) editors
Currently, editors in an invalid state within a Maybe
editor are valid and produce a Nothing
value. The concept of editors should be changed to include three possible states:
- valid state (e.g. an integer field with "3")
- invalid state (e.g. an integer field with "a")
- empty state (e.g. an integer field with "", this should only be given if the editor was generated with the optional flag)
Complex editor, e.g. for records, should generate a checkbox to indicate that they are empty.
Proposal for new types:
:: Editor = {
...
valueFromState :: !EditState -> *EditorValue a
}
:: EditorValue a = ValidValue a | InvalidValue | EmptyValue
Edited by Clean Importer