Created
July 16, 2012 12:40
-
-
Save RudolfVonKrugstein/3122467 to your computer and use it in GitHub Desktop.
haste foreign imports
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
foreign import ccall jsSetInterval :: Int -> Callback a -> IO () | |
setInterval :: Int -> IO () -> IO () | |
setInterval time cb = | |
jsSetInterval time (mkCallback $! cb) | |
foreign import ccall jsSetOnKeyDown :: Callback a -> IO () | |
foreign import ccall jsSetOnKeyUp :: Callback a -> IO () | |
setOnKeyDown :: (Int -> IO ()) -> IO () | |
setOnKeyDown cb = | |
jsSetOnKeyDown (mkCallback $! cb) | |
setOnKeyUp :: (Int -> IO ()) -> IO () | |
setOnKeyUp cb = | |
jsSetOnKeyUp (mkCallback $! cb) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment