agocorona / MFlow

(Haskell) Web application server with stateful, type safe user interactions and widget combinators
http://mflowdemo.herokuapp.com
Other
100 stars 12 forks source link

use the monoid instance of the html format instead of list to concatenate widget formatting #25

Closed agocorona closed 10 years ago

agocorona commented 10 years ago

Now the widget carries out its formatting and result in the following structure:

FormElm [format] (Maybe result)

so that when two widgets are appended, the resulting format is format1 ++ format2.

It is necessary to make use of the faster monoid of the blaze-html library so that concatenation could be faster and with less memory footprint.

To resume, to redefine the structure as:

FormElm view (Maybe result) and concatenation should be format1 <> format2

with <>= mappend

agocorona commented 10 years ago

Done