ocaml - Error: Camlp4: Uncaught exception: Not_found -
i working on ocsigen example (http://ocsigen.org/tuto/manual/macaque).
i error when trying compile program, follows.
file "testdb.ml", line 15, characters 14-81 (end @ line 18, character 4): while finding quotation "table" in position of "expr": available quotation expanders are: svglist (in position of expr) svg (in position of expr) html5list (in position of expr) html5 (in position of expr) xhtmllist (in position of expr) xhtml (in position of expr) camlp4: uncaught exception: not_found
my code is:
module lwt_thread = struct include lwt include lwt_chan end module lwt_pgocaml = pgocaml_generic.make(lwt_thread) module lwt_query = query.make_with_db(lwt_thread)(lwt_pgocaml) let get_db : unit -> unit lwt_pgocaml.t lwt.t = let db_handler = ref none in fun () -> match !db_handler | h -> lwt.return h | none -> lwt_pgocaml.connect ~database:"testbase" () let table = <:table< users ( login text not null, password text not null ) >> ..........
i used eliom-destillery generate basic files. used "make" compile program.
i've tried many different things , done google search can't figure out problem. hints appreciated.
generally speaking, error message indicates camlp4 not know quotation used, here table
, used in code <:table< ... >>
. quotations can added camlp4 extensions pa_xxx.cmo
(or pa_xxx.cma
) modules. unless made typo of quotation name, failed load extension provides camlp4.
according http://ocsigen.org/tuto/manual/macaque , macaque (or underlying libraries? not sure since have never used it) provides quotation table
. have instruct camlp4 load corresponding extension. believe vanilla eliom-destillery minimum basic eliom programming , not cover extensions macaque.
actually document http://ocsigen.org/tuto/manual/macaque points out it:
we need reference macaque in makefile :
server_package := macaque.syntax
this should camlp4 syntax extension name required table
.
Comments
Post a Comment