Created
July 10, 2012 20:53
-
-
Save RudolfVonKrugstein/3086169 to your computer and use it in GitHub Desktop.
Hello World with UHC javascript backend
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
type JSString = PackedString | |
foreign import prim "primStringToPackedString" toJS :: String -> JSString | |
data Document | |
foreign import js "document" getDocument :: IO Document | |
foreign import js "%1.write(%2)" write :: Document -> JSString -> IO () | |
main = do | |
doc <- getDocument | |
write doc $ toJS "Hello, World!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment