[Caml-list] Format OCaml Code

2011-12-22 Thread haihao shen
Hi All, Does anyone know whether there is some tools or scripts to format ocaml code in a unified format? Thanks in advance, Haihao -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocam

Re: [Caml-list] Fatal error: exception Pcre.Error(0)

2011-12-22 Thread Stéphane Glondu
Le 23/12/2011 01:13, oliver a écrit : > I also looked now, at what the original package offers... > ...for example with "make doc" a lot of additional > nice docs will be created. > > That was not offered by my OS-based installation. > So, looking at the source package was an interesting experienc

Re: [Caml-list] Fatal error: exception Pcre.Error(0)

2011-12-22 Thread Abdallah Saffidine
2011/12/22 oliver > On Thu, Dec 22, 2011 at 11:35:41PM +0100, Stéphane Glondu wrote: > > Le 22/12/2011 22:39, oliver a écrit : > > >>> where is there a documentation about these kind of errors from > pcre-lib? > > >>> I'm using Pcre.pmatch, which should just give me a bool. > > >> > > >> See pcre

[Caml-list] Ocaml-PCRE now on Arch (via AUR)

2011-12-22 Thread oliver
Hello, I created an AUR-package (Arch-Linux) for the PCRE-OCaml: https://aur.archlinux.org/packages.php?ID=55215 Ciao, Oliver -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocam

Re: [Caml-list] Fatal error: exception Pcre.Error(0)

2011-12-22 Thread Markus Mottl
Please read the pcre man page on partial matching: "man pcrepartial". The reason why e.g. "hsgshsn" gives you a partial match is that it ends in "n", and the pattern starts with "n". This means that the subject string might match the pattern "node" if it were extended appropriately. Regards, Mark

Re: [Caml-list] Fatal error: exception Pcre.Error(0)

2011-12-22 Thread oliver
Here is what I get in examples: let _ = let pattern = "node" in let doc = "httpsdjshdjshdjnodeshdsden" in (* true *) let doc = "skjdfjjeroiurt//lkj" in (* false *) let doc = "skjdf" in(* false *) let doc = "skjdfg" in

Re: [Caml-list] Fatal error: exception Pcre.Error(0)

2011-12-22 Thread oliver
On Thu, Dec 22, 2011 at 11:35:41PM +0100, Stéphane Glondu wrote: > Le 22/12/2011 22:39, oliver a écrit : > >>> where is there a documentation about these kind of errors from pcre-lib? > >>> I'm using Pcre.pmatch, which should just give me a bool. > >> > >> See pcre.mli. Pcre.Error(0) is the raw rep

Re: [Caml-list] Fatal error: exception Pcre.Error(0)

2011-12-22 Thread oliver
On Thu, Dec 22, 2011 at 11:35:41PM +0100, Stéphane Glondu wrote: > Le 22/12/2011 22:39, oliver a écrit : > >>> where is there a documentation about these kind of errors from pcre-lib? > >>> I'm using Pcre.pmatch, which should just give me a bool. > >> > >> See pcre.mli. Pcre.Error(0) is the raw rep

Re: [Caml-list] Bless me Father, for I have used Obj.magic

2011-12-22 Thread Thierry Martinez
ri...@happyleptic.org : > let make ... = > let some_operation t_priv t1 = > ... use t_priv to return a t2 ... in > let rec t_priv = { t ; > some_other_fields = some_values } > and t = { operation = some_operation t_priv ; > so

Re: [Caml-list] Fatal error: exception Pcre.Error(0)

2011-12-22 Thread Stéphane Glondu
Le 22/12/2011 22:39, oliver a écrit : >>> where is there a documentation about these kind of errors from pcre-lib? >>> I'm using Pcre.pmatch, which should just give me a bool. >> >> See pcre.mli. Pcre.Error(0) is the raw representation of Partial (i.e. >> string only matched the pattern partially).

Re: [Caml-list] Bless me Father, for I have used Obj.magic

2011-12-22 Thread rixed
-[ Thu, Dec 22, 2011 at 11:07:37PM +0100, Fabrice Le Fessant ] > You might one day forget this [Obj.magic], and access the field [t] that > has not yet been initialized, and get a segfault. As the only place where this 0 value exists is in the constructor and it can easily be shown that the fu

Re: [Caml-list] Bless me Father, for I have used Obj.magic

2011-12-22 Thread Fabrice Le Fessant
On 12/22/2011 10:24 PM, ri...@happyleptic.org wrote: > I have these types: > > type t = { operation : t1 -> t2 ; >some_fields : of_some_types } > type t_priv = { t : t ; > some_other_fields : of_some_other_types } > Should I fear some backfire? You might one day forge

Re: [Caml-list] Fatal error: exception Pcre.Error(0)

2011-12-22 Thread oliver
On Thu, Dec 22, 2011 at 08:53:56PM +0100, Stéphane Glondu wrote: > Le 22/12/2011 19:39, oliver a écrit : > > where is there a documentation about these kind of errors from pcre-lib? > > I'm using Pcre.pmatch, which should just give me a bool. > > See pcre.mli. Pcre.Error(0) is the raw representati

[Caml-list] Bless me Father, for I have used Obj.magic

2011-12-22 Thread rixed
I have these types: type t = { operation : t1 -> t2 ; some_fields : of_some_types } type t_priv = { t : t ; some_other_fields : of_some_other_types } In other words, I have a "super" type t that's further specialized by t_priv, which is hidden within t.operation as show

Re: [Caml-list] Fatal error: exception Pcre.Error(0)

2011-12-22 Thread Stéphane Glondu
Le 22/12/2011 19:39, oliver a écrit : > where is there a documentation about these kind of errors from pcre-lib? > I'm using Pcre.pmatch, which should just give me a bool. See pcre.mli. Pcre.Error(0) is the raw representation of Partial (i.e. string only matched the pattern partially). By the way

Re: [Caml-list] Fatal error: exception Pcre.Error(0)

2011-12-22 Thread oliver
On Thu, Dec 22, 2011 at 07:39:14PM +0100, oliver wrote: > Hello, > > where is there a documentation about these kind of errors from pcre-lib? > I'm using Pcre.pmatch, which should just give me a bool. [...] If I remove ~flags:[`PARTIAL] from the call, this problem vanishes. And there are some no

[Caml-list] Fatal error: exception Pcre.Error(0)

2011-12-22 Thread oliver
Hello, where is there a documentation about these kind of errors from pcre-lib? I'm using Pcre.pmatch, which should just give me a bool. Ciao, Oliver -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://group