many updates, fix everything up to 6.5
[phd-thesis.git] / top / lst / example.icl
index 8e90646..d6bb86c 100644 (file)
@@ -38,14 +38,14 @@ tasks =
                           {main=temperature dht}
                        ) dev
                >&> \t->viewSharedInformation
-                       [ViewAs \i->toString (fromMaybe 0.0 i) +++ "C"] t
+                               [ViewAs \i->toString (fromMaybe 0.0 i) +++ "C"] t
                        <<@ Hint "Current Temperature" @! ())
        , ("lightswitch", \dev-> /*\label{lst:example:ls1}*/
                withShared False \sh->
-                       liftmTask (lightswitch sh) dev
+                           liftmTask (lightswitch sh) dev
                        -|| updateSharedInformation [] sh <<@ Hint "Switch")/*\label{lst:example:ls2}*/
-       , ("factorial", \dev->
-               updateInformation [] 5 <<@ Hint "Factorial of what?"
+       , ("remote computation", \dev->
+                       updateInformation [] 5 <<@ Hint "Factorial of what?"
                >>? \i->liftmTask (factorial i) dev
                >>- \r->viewInformation [] r <<@ Hint "Result" @! ())
        ]
@@ -62,10 +62,10 @@ blink d =
                >>|. delay (lit d)
                >>|. bl (Not st))
        In {main=bl true}
-lightswitch :: (Shared sds Bool) -> Main (MTask v ()) | liftsds, mtask v & RWShared sds & TC (sds () Bool Bool)
+lightswitch :: (Shared sds Bool) -> Main (MTask v ()) | lowerSds, mtask v & RWShared sds & TC (sds () Bool Bool)
 lightswitch sh =
        declarePin D13 PMOutput \d13->
-       liftsds \ls=sh
+       lowerSds \ls=sh
        In fun \f=(\st->
                     getSds ls
                >>*. [IfValue ((!=.)st) (\v->writeD d13 v)]