Created
July 12, 2014 22:54
-
-
Save cgag/ee332cebb908e480eb5e to your computer and use it in GitHub Desktop.
purescript alert ffi
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
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