Skip to content

Instantly share code, notes, and snippets.

@ridiculousfish
Created November 17, 2014 20:51
Show Gist options
  • Save ridiculousfish/05514f88eb0d13b0e629 to your computer and use it in GitHub Desktop.
Save ridiculousfish/05514f88eb0d13b0e629 to your computer and use it in GitHub Desktop.
import Haste
import Haste.App
import Haste.Foreign
server_func_1 :: Server (String)
server_func_1 = return "func1"
server_func_2 :: Server ()
server_func_2 = return ()
entry_point :: IO ()
entry_point = do
runApp def $ do
remote_1 <- remote server_func_1
remote_2 <- remote server_func_2
runClient $ do
val <- onServer $ remote_1
writeLog $ "Got: " ++ val
main :: IO ()
main = do
#ifdef __HASTE__
export (toJSString "hs_entry_point") entry_point
#endif
runApp def $ do
-- remote_1 <- remote server_func_1
remote_2 <- remote server_func_2
runClient $ return ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment