con t :: Type -> Type
(* The type of widgets expecting a particular type of message as input *)

con action = fn state => {Re_render : option xbody,
                          Change_state : option state}
(* The two sorts of changes allowed upon message receipt *)

val create : state ::: Type
             (* Type of internal component state *)
             -> msg ::: Type
             (* Type of messages that can be received *)
             -> (state -> msg -> action state)
             (* Message handler *)
             -> state
             (* Initial state *)
             -> xbody
             (* Initial HTML rendering *)
             -> transaction (t msg)

val render : msg ::: Type -> t msg -> xbody
(* Render a widget as HTML *)

val notify : msg ::: Type -> t msg -> msg -> transaction {}
(* Send a widget a message *)