Source

ocaml-logicm / tests_cps.ml

Full commit
open LogicM_cps


module MonadIdentity : Monad
 =
  struct
    type 'a m = 'a
    let return x = x
    let bind f m = f m
  end


module LogicM = LogicT(MonadIdentity)

type bindr = { bind : 'a 'b .
  ('a -> 'b LogicM.m) -> 'a LogicM.m -> 'b LogicM.m
}


let run_test ~time ~fn testfunc =
  Printf.printf "%s/cps:\n%!" fn;
  time (testfunc ~bindr:{bind = LogicM.bind}) ();
  print_newline ()