[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

examples won't run



I tried to run the examples on
http://www.recherche.enac.fr/opti/facile/doc/manual004.html
but couldn't.

The second one clearly has some garbled syntax where it should print out
the results.  None of my efforts to fix it produced something that
worked.  I'm very new to OCaml.

The first one gives me
$ ./facile -I +facile eg1.ml
File "eg1.ml", line 10, characters 11-30:
This expression has type bool but is here used with type Facile.Cstr.t

I did ocamlmktop -o facile -I +facile facile.cma as you suggested before
doing this.

I'm on Debian GNU/Linux with
libfacile-ocaml-dev               1.1-5
ocaml-nox      3.09.2-9

Ross Boylan

P.S. I tried the examples because my testprogram
open Facile
open Easy

let _ =
 (* Variables *)
 let a = Fd.interval 0 9 and b = Fd.interval 0 9 in
 (* Constraints *)
(*
 Cstr.post (((fd2e a) + (fd2e b)) = i2e 4);
*)
 Cstr.post( fd2e a < i2e 3);
   Cstr.post( fd2e b < i2e 2);
 (* Goal *)
 let var_list = [a; b] in
 let goal = Goals.List.labeling var_list in
 if Goals.solve goal then begin
 Printf.printf "a="; Fd.fprint stdout a;
 Printf.printf " b="; Fd.fprint stdout b;
 print_newline () end

gives
File "rb1.ml", line 11, characters 10-27:
This expression has type bool but is here used with type Facile.Cstr.t
I tried the constraints in the comments first.



Reply to: