caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* caml versions format
@ 2006-09-13 15:34 Guillaume Rousse
  2006-09-13 16:12 ` [Caml-list] " Virgile Prevosto
  0 siblings, 1 reply; 3+ messages in thread
From: Guillaume Rousse @ 2006-09-13 15:34 UTC (permalink / raw)
  To: caml-list

I just get struck by a "3.10+dev8" version string, which breaks my
assumtion that ocaml version are always formated as X.Y.Z, where X, Y
and Z are numerical only.

Do all development version using this specific format, or are they any
other fancy extension ? And how should it get compared to other version
? Should 3.10+dev8 satisfy a minimal 3.10.0 version requirement ?


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

* Re: [Caml-list] caml versions format
  2006-09-13 15:34 caml versions format Guillaume Rousse
@ 2006-09-13 16:12 ` Virgile Prevosto
  2006-09-13 18:09   ` Martin Jambon
  0 siblings, 1 reply; 3+ messages in thread
From: Virgile Prevosto @ 2006-09-13 16:12 UTC (permalink / raw)
  To: caml-list

Hello Guillaume,

2006/9/13, Guillaume Rousse <Guillaume.Rousse@inria.fr>:
> I just get struck by a "3.10+dev8" version string, which breaks my
> assumtion that ocaml version are always formated as X.Y.Z, where X, Y
> and Z are numerical only.

I had the same issue once. Since then, the documentation for
Sys.ocaml_version details what you can find in the string:
http://caml.inria.fr/pub/docs/manual-ocaml/libref/Sys.html
(this is the last item in the page). Basically, you have something like
X.Y[.Z][+comment], where the last two parts are optional.

-- 
E tutto per oggi, a la prossima volta
Virgile


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

* Re: [Caml-list] caml versions format
  2006-09-13 16:12 ` [Caml-list] " Virgile Prevosto
@ 2006-09-13 18:09   ` Martin Jambon
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Jambon @ 2006-09-13 18:09 UTC (permalink / raw)
  To: virgile.prevosto; +Cc: caml-list

On Wed, 13 Sep 2006, Virgile Prevosto wrote:

> Hello Guillaume,
>
> 2006/9/13, Guillaume Rousse <Guillaume.Rousse@inria.fr>:
> > I just get struck by a "3.10+dev8" version string, which breaks my
> > assumtion that ocaml version are always formated as X.Y.Z, where X, Y
> > and Z are numerical only.
>
> I had the same issue once. Since then, the documentation for
> Sys.ocaml_version details what you can find in the string:
> http://caml.inria.fr/pub/docs/manual-ocaml/libref/Sys.html
> (this is the last item in the page). Basically, you have something like
> X.Y[.Z][+comment], where the last two parts are optional.

In the micmatch tutorial, I give this example, which should parse the
version string correctly (or abort):

# Sys.ocaml_version;;
- : string = "3.08.3"
# RE num = digit+;;
# let / (num as major : int)
        "." (num as minor : int)

        ("." (num as patchlevel := fun s -> Some (int_of_string s))
        | ("" as patchlevel = None))

        ("+" (_* as additional_info := fun s -> Some s)
        | ("" as additional_info = None))

        eos / = Sys.ocaml_version
;;
val additional_info : string option = None
val major : int = 3
val minor : int = 8
val patchlevel : int option = Some 3



--
Martin Jambon, PhD
http://martin.jambon.free.fr


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

end of thread, other threads:[~2006-09-13 18:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-13 15:34 caml versions format Guillaume Rousse
2006-09-13 16:12 ` [Caml-list] " Virgile Prevosto
2006-09-13 18:09   ` Martin Jambon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).