ghcjs-commonjs/old-examples/Main.hs
2016-06-16 22:43:24 -03:00

16 lines
409 B
Haskell

import Control.Concurrent
import GHCJS.Marshal.Pure
import GHCJS.Require
helloWorld = putStrLn "[haskell] Hello World"
launchTheMissiles = do
threadDelay (1000 * 1000 * 5)
putStrLn "[haskell] OMG what did I do?!"
return $ Just $ pToJSVal (10 :: Double)
main = do
export0 "helloWorld" helloWorld
export "launchTheMissiles" launchTheMissiles
defaultMain