Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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 <> 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,