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
path prefixes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-09-17 (12:55)
From: Keiko Nakata <keiko@k...>
Subject: path prefixes
Hello.

I can omit prefixing paths but for the first item for records:
i.e. 

module M = struct type t = {x:int; y:int} end
let a = {M.x = 1; y = 2}

But can not I omit prefixing paths for datatypes?
i.e. 
module M = struct type t = X | Y end
let f x = match x with M.X -> 1 | Y -> 2

The latter is also helpful; perhaps camlp4 helps me?

Sincerely,
Keiko