From: Guillaume Yziquel <guillaume.yziquel@citycable.ch>
To: OCaml List <caml-list@inria.fr>
Subject: camlp4 unbound value
Date: Mon, 08 Feb 2010 12:46:07 +0100 [thread overview]
Message-ID: <4B6FF97F.7010202@citycable.ch> (raw)
Hi. This is for camlp4 gurus:
I've been using a modified version of Mauricio Fernandez' relational
algebra camlp4 extension for postgresql. (I'm trying to adapt it to
another database system, so I've functorised a bit of the original code).
You can find the modified code and a Debian package at:
http://yziquel.homelinux.org/debian/pool/main/o/ocaml-relational/
http://yziquel.homelinux.org/gitweb?p=ocaml-relational.git;a=summary
My question is the following: Relational.Conv_Postgresql.encode_int is
properly defined, and available from the toplevel, and yet considered
unbound in the camlp4-generated code.
How can this be?
> yziquel@seldon:~$ ocaml
> Objective Caml version 3.11.1
>
> # #use "topfind";;
> - : unit = ()
> Findlib has been successfully loaded. Additional directives:
> #require "package";; to load a package
> #list;; to list the available packages
> #camlp4o;; to load camlp4 (standard syntax)
> #camlp4r;; to load camlp4 (revised syntax)
> #predicates "p,q,...";; to set these predicates
> Topfind.reset();; to force that packages will be reloaded
> #thread;; to enable threads
>
> - : unit = ()
> # #thread;;
> /usr/lib/ocaml/threads: added to search path
> /usr/lib/ocaml/unix.cma: loaded
> /usr/lib/ocaml/threads/threads.cma: loaded
> # #camlp4o;;
> /usr/lib/ocaml/dynlink.cma: loaded
> /usr/lib/ocaml/camlp4: added to search path
> /usr/lib/ocaml/camlp4/camlp4o.cma: loaded
> Camlp4 Parsing version 3.11.1
>
> # #require "relational.postgresql";;
> /usr/lib/ocaml/pcre: added to search path
> /usr/lib/ocaml/pcre/pcre.cma: loaded
> /usr/lib/ocaml/netsys: added to search path
> /usr/lib/ocaml/netsys/netsys.cma: loaded
> /usr/lib/ocaml/netstring: added to search path
> /usr/lib/ocaml/netstring/netstring.cma: loaded
> /usr/lib/ocaml/netstring/netstring_mt.cmo: loaded
> /usr/lib/ocaml/netstring/netstring_top.cmo: loaded
> /usr/lib/ocaml/netstring/netaccel.cma: loaded
> /usr/lib/ocaml/netstring/netaccel_link.cmo: loaded
> /usr/lib/ocaml/relational: added to search path
> /usr/lib/ocaml/relational/relational.cma: loaded
> /usr/lib/ocaml/postgresql: added to search path
> /usr/lib/ocaml/postgresql/postgresql.cma: loaded
> /usr/lib/ocaml/relational/pa_relational.cmo: loaded
> /usr/lib/ocaml/relational/pa_relational_postgresql.cmo: loaded
> # TABLE user users COLUMN id SERIAL AUTO PRIMARY KEY END;;
> Error: Unbound value Relational.Conv_Postgresql.encode_int
> # module X = Relational.Conv_Postgresql;;
> module X :
> sig
> val encode_string : string -> string
> val decode_string : string -> string
> val decode_bool : string -> bool
> val encode_bool : bool -> string
> val encode_int : int -> string
> val decode_int : string -> int
> val encode_float : float -> string
> val decode_float : string -> float
> val encode_nullable : ('a -> string) -> 'a option -> string
> val decode_timestamp : string -> float
> val decode_timestampz : string -> float
> val encode_timestamp : float -> string
> val encode_timestampz : float -> string
> val decode_time : string -> float
> val decode_timez : string -> float
> val encode_time : float -> string
> val encode_timez : float -> string
> val decode_date : string -> Relational.Types.date
> val encode_date : Relational.Types.date -> string
> end
> # Relational.Conv_Postgresql.encode_int;;
> - : int -> string = <fun>
> #
--
Guillaume Yziquel
http://yziquel.homelinux.org/
next reply other threads:[~2010-02-08 11:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-08 11:46 Guillaume Yziquel [this message]
2010-02-08 17:04 ` [Caml-list] " blue storm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B6FF97F.7010202@citycable.ch \
--to=guillaume.yziquel@citycable.ch \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox