From d2035342e6cd8d1e7c8445f812d8a9ffb4c8d5f7 Mon Sep 17 00:00:00 2001 From: Alberto Date: Thu, 29 Sep 2016 18:52:14 +0200 Subject: [PATCH] Update distributedApps.hs --- examples/distributedApps.hs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/examples/distributedApps.hs b/examples/distributedApps.hs index 8dfa13d..b247fd1 100644 --- a/examples/distributedApps.hs +++ b/examples/distributedApps.hs @@ -40,7 +40,17 @@ import Data.Typeable data Options= MapReduce | Chat | MonitorNodes | AllThree deriving (Typeable, Read, Show) -main = keep' $ initNode $ inputNodes <|> do +main = keep' $ initNode $ inputNodes <|> menuApp <|> thelink + +thelink= do + local . render $ rawHtml $ do + br;br + a ! href (fs "https://github.com/agocorona/transient-universe/blob/master/examples/distributedApps.hs") $ "source code" + +menuApp= do + local . render . rawHtml $ do + h1 "Transient Demo" + br; br op <- local . render $ wlink MapReduce (b "map-reduce") <++ fs " " <|> wlink Chat (b "chat") <++ fs " " <|> @@ -93,9 +103,6 @@ fs= fromString -- a chat widget that run in the browser and in a cloud of servers - - - chat = do let chatMessages= fs "chatMessages"