Source

ocaml-iteratees / tests_common.ml

Diff from to

tests_common.ml

 
 value test_limit ~feed_cont n =
  let () = P.printf "test_limit: n=%i, feed_cont=%b\n%!" n feed_cont in
- let ctch ~b it =
+ let ctch ~b itf =
    if not b
    then
-     it
+     itf ()
    else
      catchk
-      it
+      itf
       (fun err_msg _cont ->
          let () = P.printf "limited: caught %s%!" &
            match err_msg with
   let res = runA &
     (enum_pure_nchunk limit_chars 3)
     ( ctch ~b:True
-        ( (limit n limited_iteratee) >>= fun it ->
+        ( fun () ->
+          (limit n limited_iteratee) >>= fun it ->
           ( match it with
             [ IE_done i -> return & Some i
             | IE_cont None cont ->
 (*
 
     ( ctch ~b:True
-        ( (joinI & limit n limited_iteratee) >>= fun i ->
+        ( fun () ->
+          (joinI & limit n limited_iteratee) >>= fun i ->
           break_chars (fun _ -> False) >>= fun str ->
           return (i, str)
         )
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.