Closed upsiflu closed 1 year ago
Going with #29, State
should not be a module because we don't treat it as a permanent data type. Instead, it is a collection of functions that map to and from the Url
.
What does the Url map to and from?
Where is State
used?
Ui
: only Link
Html
: only Link
Here are all Url-centric functions from the current State
module.
I excluded the Link-centric functions.
type
UrlCmd = Set Assignment | Add Assignment | Clear String
Motivation For the user, Ui, application and Link are the relevant Apis for construction.
State
is never constructed, and only stored in an application as a Url. As any Url is a valid State, we do a type alias.instead of