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

Bug. Related to dField? #66

Open nickgeoca opened 8 years ago

nickgeoca commented 8 years ago

Description: dField bug? In the code below, the result of n+n' does not show up in browser. Line: haskell dField( p << (n+n') ++> noWidget)) Version:

Note this code was found in the tutorial and appears to apply to all dField examples in the tutorial. The code sample below is from the second to last tutorial in the link.

{-# LANGUAGE OverloadedStrings #-} 

import MFlow.Wai.Blaze.Html.All
import Data.Monoid

main= do
  userRegister "user" "user"

  runNavigation "" . step . page $ 
     wform wlogin **>
     ( pageFlow "s" . edTemplate "user" "template.html" .  witerate $ do
        (n,n') <- page $ (,) <$> dField(getInt Nothing) <++ br
                             <*> dField(getInt Nothing) <++ br
                             <** submitButton "send"

        dField( p << (n+n') ++> noWidget))