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
Re: [Caml-list] define incompatible type
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-02-12 (09:25)
From: abau@i...
Subject: Re: [Caml-list] define incompatible type
On Fri, 12 Feb 2010 13:13:33 +0530
Grégoire Seux <kamaradclimber@gmail.com> wrote:

> too bad it does not exist !

>From ocaml language definition:

> The optional type equation "= typexpr" makes the defined type
> equivalent to the type expression "typexpr" on the right of the "="
> sign: one can be substituted for the other during typing.

When "type foo = int" then foo is just a type alias for int and
therefor it can/will be substituted by int.

HTWK Leipzig FbIMN Webmail, https://webmail.imn.htwk-leipzig.de