(* Existential type body for our data items *) con whateverField = fn t :: Type => { Name : text, (* Display name *) ToHtml : t -> bodyTags, (* Output the field value in HTML *) Input : tab :: NameOpt -> name :: FieldName -> tagsEnv form (Empty(Type)) [[@@tab.name : t]], (* Generate a form input tag for a value for this field *) } (* Generate the application *) val metaform : fields :: {Exists whateverField} -> unit -> htmlTags