Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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