Created
August 2, 2018 16:21
-
-
Save matthewbauer/7d6363aae15aec469b7c6c1885e0ab6e to your computer and use it in GitHub Desktop.
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
-- Compile: ghcjs -O -fforce-recomp test.hs | |
import qualified Data.Text.IO as T | |
import qualified Data.Text as T | |
import GHCJS.Prim | |
foreign import javascript unsafe "alert($1);" alert :: JSVal -> IO () | |
main = do | |
alert $ toJSString "hello1" | |
T.putStrLn $ T.pack "hello2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment