Skip to content

Instantly share code, notes, and snippets.

@RudolfVonKrugstein
Created July 16, 2012 12:41
Show Gist options
  • Save RudolfVonKrugstein/3122476 to your computer and use it in GitHub Desktop.
Save RudolfVonKrugstein/3122476 to your computer and use it in GitHub Desktop.
UHC global objects imports
foreign import js "saveObject(%1, %2)"
jsSaveObject :: JSString -> a -> IO ()
saveObject :: String -> a -> IO ()
saveObject s a = jsSaveObject (toJS s) a
foreign import js "loadObject(%1)"
jsLoadObject :: JSString -> IO a
loadObject = jsLoadObject . toJS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment