English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Record types "with" syntax and camlp4
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-02-21 (18:34)
From: Gabriel Kerneis <gabriel.kerneis@e...>
Subject: Record types "with" syntax and camlp4
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable


the { x with y =3D z} syntax seems to be broken in camlp4. But i can't
find any information about it in the (deprecated ?) camlp4 manual.

19:29 gabriel % cat record.ml=20
type t =3D { a : int ; b : float } ;
value x =3D=20
  let s =3D {a=3D5 ; b=3D 1.5} in
     {s with b =3D 4.1}  ;

19:29 gabriel % camlp4rf record.ml =20
File "record.ml", line 4, characters 8-12:
Parse error: [fun_binding] expected after [label_longident] (in
zsh: exit 2     camlp4rf record.ml

Any hint ?

Thanks a lot,
Gabriel Kerneis

Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

Version: GnuPG v1.4.6 (GNU/Linux)