Here you can take a look at a complete example included in the package:
http://haskell-web.blogspot.com/2012/02/web-application-server-with-stateful.html
This snippet is the web page in declarative form:
shopProds :: V.Vector Int -> [Prod] -> View Html IO (Either Int Prod) shopProds cart products= br <++ -- add Html to the first widget p << "-----Shopping List-----" <++ widget(Selection{ stitle = bold << "choose an item", sheader= [ bold << "item" , bold << "price", bold << "times chosen"], sbody= [([toHtml pname, toHtml $ show pprice, toHtml $ show $ cart V.! i],i ) | (Prod{..},i ) <- zip products [1..]]}) <+> -- operator to mix two wdigets br <++ -- add Html to the second widget p << "---Add a new product---" <++ table <<< -- <<< encloses a widget in HTML tags (tr <<< td ! [valign "top"] <<< widget (Form (Nothing :: Maybe Prod) ) ++> -- append Html after the widget tr << td ! [align "center"] << hotlink "hello" (bold << "Hello World"))