Permalink
Browse files

Predicates in type sigs cause problems with param count

  • Loading branch information...
1 parent d773a1f commit a9be3e51c405e9a42a6dbd7fd269f111cb69607f @spockz spockz committed Dec 29, 2011
@@ -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
@@ -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

0 comments on commit a9be3e5

Please sign in to comment.