Skip to content

Instantly share code, notes, and snippets.

@meditans
Created January 27, 2016 14:14
Show Gist options
  • Select an option

  • Save meditans/08771707f45dc744a5b0 to your computer and use it in GitHub Desktop.

Select an option

Save meditans/08771707f45dc744a5b0 to your computer and use it in GitHub Desktop.
{-# LANGUAGE OverloadedStrings #-}
module Lib
( someFunc
) where
import Data.JSString ()
import GHCJS.Types
foreign import javascript unsafe "window.alert($1)" js_alert :: JSString -> IO ()
someFunc :: IO ()
someFunc = js_alert "Hello from GHCJS!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment