Permalink
Browse files

getAttr in IO, also add getAttr_

  • Loading branch information...
1 parent b47a947 commit bdd30b8a40f154aca773e166ec2bfa4d7fbbe6bf @norm2782 norm2782 committed Jan 7, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 uhc-jscript/src/Language/UHC/JScript/Primitives.hs
@@ -41,15 +41,18 @@ setCtor s1 fp = _setCtor (toJS s1) fp
foreign import prim "primSetCtor"
_setCtor :: JSString -> JSFunPtr a -> IO ()
-getAttr :: String -> JSPtr p -> a
+getAttr :: String -> JSPtr p -> IO a
getAttr s p = _getAttr (toJS s) p
foreign import prim "primGetAttr"
- _getAttr :: JSString -> JSPtr p -> a
+ _getAttr :: JSString -> JSPtr p -> IO a
setAttr :: String -> a -> JSPtr p -> IO (JSPtr p)
setAttr s a p = _setAttr (toJS s) a p
+setAttr_ :: String -> a -> JSPtr p -> IO ()
+setAttr_ s a p = setAttr s a p >> return ()
+
foreign import prim "primSetAttr"
_setAttr :: JSString -> a -> JSPtr p -> IO (JSPtr p)

0 comments on commit bdd30b8

Please sign in to comment.