Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* camlp4 unbound value
@ 2010-02-08 11:46 Guillaume Yziquel
  2010-02-08 17:04 ` [Caml-list] " blue storm
  0 siblings, 1 reply; 2+ messages in thread
From: Guillaume Yziquel @ 2010-02-08 11:46 UTC (permalink / raw)
  To: OCaml List

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/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-08 17:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-08 11:46 camlp4 unbound value Guillaume Yziquel
2010-02-08 17:04 ` [Caml-list] " blue storm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox