mirror of
https://github.com/beijaflor-io/ghcjs-commonjs.git
synced 2024-09-11 16:25:25 +03:00
16 lines
409 B
Haskell
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
|