This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| {"label": "Afghanistan", "value": "af", | |
| {"label": "Åland Islands", "value": "ax"}, | |
| {"label": "Albania", "value": "al"}, | |
| {"label": "Algeria", "value": "dz"}, | |
| {"label": "American Samoa", "value": "as"}, | |
| {"label": "AndorrA", "value": "ad"}, | |
| {"label": "Angola", "value": "ao"}, | |
| {"label": "Anguilla", "value": "ai"}, | |
| {"label": "Antarctica", "value": "aq"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type _ t = | |
| | Form_value : 'a -> 'a t | |
| | Form_field : string -> string t | |
| | Form_map : 'a t * ('a -> ('b, string) result) -> 'b t | |
| | Form_both : 'a t * 'b t -> ('a * 'b) t | |
| let value v = Form_value v | |
| let empty = Form_value () | |
| let field name = Form_field name | |
| let map v f = Form_map (v, f) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type 'a t | |
| (** [a t] represents a form parser which produces a value of type [a]. *) | |
| val field : string -> string t | |
| (** [field name] parses a string typed value for form field [name]. *) | |
| val map : 'a t -> ('a -> ('b, string) result) -> 'b t | |
| (** [map v f] validates [v] with [f]. *) | |
| val both : 'a t -> 'b t -> ('a * 'b) t |