Commit 3445a30c authored by Rinus Plasmeijer's avatar Rinus Plasmeijer
Browse files

*** empty log message ***

parent 1d3d5d80
......@@ -22,17 +22,11 @@ where
= mkHtml "test" html hst
test2 tst
# (tb,ta,tst) = LazyTask "test" (mkTask test) tst
//# (a,tst) = ta tst
# (b,tst) = PCTask2 ( STask "Klaar1" True, STask "Klaar2" True) tst
# (tb,aa,tst) = LTask "test" (mkTask travel) tst
# (b,tst) = PCTask2 ( tb, STask "Klaar2" True) tst
# (b,tst) = PCTask2 ( STask "Klaar1" True, STask "Klaar2" True) tst
= (b,tst)
test tst
# (a,tst) = PTasks [ ("travel",travel)
, ("keuze2",STask "Gereed" "")
] tst
= STask "Klaar" a tst
:: EenOfAnder = Naam | Woonplaats
......@@ -53,6 +47,7 @@ where
(==) Woonplaats Woonplaats = True
(==) _ _ = False
// travel request
travel tst
......
......@@ -8,7 +8,7 @@ import StdHtml
:: Task a :== St *TSt a // an interactive task
:: IDataFun a :== St *HSt (Form a) // an iData Form
LazyTask :: String (Task a) *TSt -> (Task Bool,Task (Maybe a),*TSt) | gForm{|*|}, gUpd{|*|}, gPrint{|*|}, gParse{|*|}, TC a
LTask :: String (Task a) *TSt -> (Task Bool,Maybe a,*TSt) | gForm{|*|}, gUpd{|*|}, gPrint{|*|}, gParse{|*|}, TC a
derive gForm Maybe
derive gUpd Maybe
derive gPrint Maybe
......
......@@ -13,18 +13,20 @@ derive gPrint Niks
// lazy task ???
LazyTask :: String (Task a) *TSt -> (Task Bool,Task (Maybe a),*TSt) | gForm{|*|}, gUpd{|*|}, gPrint{|*|}, gParse{|*|}, TC a
LazyTask s task tst=:((j,myturn,html),hst) = LazyTask` s task (incTask tst)
LTask :: String (Task a) *TSt -> (Task Bool,Maybe a,*TSt) | gForm{|*|}, gUpd{|*|}, gPrint{|*|}, gParse{|*|}, TC a
LTask s task tst=:((j,myturn,html),hst)
# (bt,(mba,tst)) = LazyTask` s task (incTask tst)
= (bt,mba,tst)
where
LazyTask` s task tst=:((j,myturn,html),hst) = (BT,LT s task,incTask tst)
LazyTask` s task tst=:((_,myturn,html),hst) = (BT,LT s task tst)
where
LT s task tst = mkTask (LT` s task) tst
where
LT` s task tst=:((i,myturn,html),hst)
# (todo,hst) = mkEditForm (Init,nFormId editId False) hst
| todo.value
# (a,((i,myturn,html),hst)) = task ((i,True,html),hst)
= (Just a,((i,True,html),hst))
# (a,((i,adone,ahtml),hst)) = task ((i,True,[]),hst)
= (Just a,((i,True,html <|.|> if adone [] [Txt ("lazy task \"" +++ s +++ "\" activated"),Br] <|.|> ahtml),hst))
= (Nothing,((i,True,html),hst))
BT tst = mkTask (BT`) tst
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment