Created
November 17, 2014 20:51
-
-
Save ridiculousfish/05514f88eb0d13b0e629 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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