Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Predicates in type sigs cause problems with param count

  • Loading branch information...
commit a9be3e51c405e9a42a6dbd7fd269f111cb69607f 1 parent d773a1f
@spockz spockz authored
View
3  uhc-jscript/src/Language/UHC/JScript/JQuery/Ajax.hs
@@ -11,7 +11,8 @@ data JQXHRPtr
type JQXHR = JSPtr JQXHRPtr
-type AjaxCallback r = JS r => r -> String -> JQXHR -> IO()
+-- type AjaxCallback r = JS r => r -> String -> JQXHR -> IO()
+type AjaxCallback r = r -> String -> JQXHR -> IO()
type JSAjaxCallback r = JSFunPtr (AjaxCallback r)
data AjaxRequestType = GET | POST
View
12 uhc-jscript/src/Language/UHC/JScript/JQuery/JQuery.hs
@@ -51,7 +51,19 @@ foreign import jscript "jQuery.when(%*)"
foreign import jscript "jQuery.when(%*)"
when'' :: JSPtr a -> JSPtr a -> JSPtr a -> IO ()
+
+-------------------------------------------------------------------------------
+-- DOM
+
+foreign import jscript "%1.each(%2)"
+ each :: JQuery -> JSFunPtr (Int -> JSPtr a -> IO ()) -> IO ()
+
+foreign import jscript "jQuery.each(%*)"
+ each' :: b -> JSFunPtr (Int -> JSPtr a -> IO ()) -> IO ()
+
+foreign import jscript "wrapper"
+ mkEachIterator :: (Int -> JSPtr a -> IO ()) -> IO (JSFunPtr (Int -> JSPtr a -> IO ()))
-------------------------------------------------------------------------------
-- DOM
Please sign in to comment.
Something went wrong with that request. Please try again.