Commit fe6dfd60 authored by Rinus Plasmeijer's avatar Rinus Plasmeijer

*** empty log message ***


git-svn-id: https://svn.cs.ru.nl/repos/iTask-system/trunk@121 63da3aa8-80fd-4f01-9db8-e6ea747a3da2
parent 6eb8553c
......@@ -20,11 +20,11 @@ gPrint{|(->)|} gArg gRes _ _ = abort "functions can only be used with dynamic st
:: *HSt = { cntr :: !Int // counts position in expression
, submits :: !Bool // True if we are in submit form
, states :: !*FormStates // all form states are collected here ...
, world :: *NWorld // to enable all other kinds of I/O
, states :: !*FormStates // all form states are collected here ...
, world :: *NWorld // to enable all other kinds of I/O
}
:: InputId :== Int // unique id for every constructor and basic value appearing in the state
:: FormUpdate :== (InputId,UpdValue) // info obtained when form is updated
:: InputId :== Int // unique id for every constructor and basic value appearing in the state
:: FormUpdate :== (InputId,UpdValue) // info obtained when form is updated
:: Inline = Inline String
......
......@@ -205,8 +205,8 @@ appIData :: (IDataFun a) -> Task a | iData a
appIData2 :: (String *HSt -> *(Form a,*HSt)) -> Task a | iData a
appHStOnce :: !String (HSt -> (a,HSt)) -> Task a | iData a
appHSt :: !String (HSt -> (a,HSt)) -> Task a | iData a
appWorldOnce :: !String (World -> *(a,*World)) -> Task a | iData a
appWorld :: !String (World -> *(a,*World)) -> Task a | iData a
appWorldOnce :: !String (*World -> *(a,*World)) -> Task a | iData a
appWorld :: !String (*World -> *(a,*World)) -> Task a | iData a
// *********************************************************************************************************************************
/* Operations on Task state
......
......@@ -1564,16 +1564,22 @@ liftHst fun tst=:{hst}
# (fvalue,hst) = fun hst
= (fvalue,{tst & hst = hst})
appWorldOnce :: !String (World -> *(a,*World)) -> (Task a) | iData a
appWorldOnce :: !String (*World -> *(a,*World)) -> (Task a) | iData a
appWorldOnce label fun = Once label (liftWorld fun)
appWorld :: !String (World -> *(a,*World)) -> (Task a) | iData a
appWorld :: !String (*World -> *(a,*World)) -> (Task a) | iData a
appWorld label fun = mkTask label (liftWorld fun)
liftWorld fun tst
liftWorld :: (*World -> *(a,*World)) *TSt -> *(a,*TSt)
liftWorld fun tst=: {hst = hst=:{world = world=:{worldC}}}
# (fvalue,theWorld) = fun worldC
= (fvalue,{tst & hst = {hst & world = {world & worldC = theWorld}}})
/*
#! theWorld = tst.hst.world.worldC
# (fvalue,theWorld) = fun theWorld
= (fvalue,{tst & hst.world.worldC = theWorld})
*/
Once :: !String !(Task a) -> (Task a) | iData a
Once label task = mkTask label doit
......
Markdown is supported
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