Build complex forms with validation in Elm

In addition to the two hardest problems in computer science — cache invalidation and naming things — I would add one more, which is dealing with user input via forms.

Somehow, forms tend to evolve into a tangle of interdependencies between fields and byzantine validation rules. "This field is optional based on particular values of three other fields, and not shown at all if another checkbox is selected (but we still want the corresponding value to be calculated as an average of the...