Skip to content

Instantly share code, notes, and snippets.

@RudolfVonKrugstein
Created July 10, 2012 21:34
Show Gist options
  • Save RudolfVonKrugstein/3086389 to your computer and use it in GitHub Desktop.
Save RudolfVonKrugstein/3086389 to your computer and use it in GitHub Desktop.
Hello World with haste
import Haste
import Haste.Prim
type Document = JSAny
foreign import ccall "objWrite" write :: Document -> JSString -> IO ()
foreign import ccall "getDocument" getDocument :: IO Document
main = do
doc <- getDocument
write doc $ toJSStr "Hello World!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment