Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] record declaration, SML
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] record declaration, SML
Hi,

> What's best translation of the following SML type?
> datatype t = C of { f : int }

A solution is:
  type t = C of < f : int >

It is what does the converter SML->OCaml by Camlp4:
  camlp4 pa_sml.cmo pr_o.cmo -impl file.sml

-- 
Daniel de RAUGLAUDRE
http://cristal.inria.fr/~ddr/
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners