import           Control.Concurrent
import qualified GHCJS.CommonJS as CommonJS

helloWorld = putStrLn "[haskell] Hello World"

launchTheMissiles :: IO Int
launchTheMissiles = do
    threadDelay (1000 * 1000 * 5)
    putStrLn "[haskell] OMG what did I do?!"
    return 10

main =
    CommonJS.exportMain
        [ CommonJS.pack ("helloWorld", helloWorld)
        , CommonJS.pack ("launchTheMissiles", launchTheMissiles)
        ]

import           Control.Concurrent
import           GHCJS.CommonJS     (exportMain, exports)

helloWorld = putStrLn "[haskell] Hello World"

launchTheMissiles :: IO Int
launchTheMissiles = do
    threadDelay (1000 * 1000 * 5)
    putStrLn "[haskell] OMG what did I do?!"
    return 10

main =
    exportMain
        [ "helloWorld" `exports` helloWorld
        , "launchTheMissiles" `exports` launchTheMissiles
        ]

Update webpack example to the latest API
Update webpack example to the latest API
