Skip to content

Instantly share code, notes, and snippets.

@cgag
Created July 12, 2014 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cgag/ee332cebb908e480eb5e to your computer and use it in GitHub Desktop.
Save cgag/ee332cebb908e480eb5e to your computer and use it in GitHub Desktop.
purescript alert ffi
module FFI.Test where
import Control.Monad.Eff
import Debug.Trace
foreign import data Alert :: !
foreign import alert
"function alert(s) { \
\ return function() { \
\ window.alert(s); \
\ }; \
\}" :: forall r. String -> Eff (alert :: Alert | r) { }
main = do
trace "test"
alert "hello"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment