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
Generalized algebraic datatypes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-04-28 (06:50)
From: Gabriel Kerneis <kerneis@e...>
Subject: Re: [Caml-list] Generalized algebraic datatypes
On Mon, Apr 28, 2008 at 01:35:06AM -0400, Jacques Le Normand wrote:
> Does ocaml support Generalized Algebraic datatypes? 


> If not, are there any caml based compilers that support it?

Some pieces of software (e.g. Ocsigen), which need GADT, use (very
carefuly crafted) "black magic" (Obj.magic) to get things compiled. 
You could probably do this in your "toy compiler", put you will loose 
the benefit of Ocaml's type-checking.

Gabriel Kerneis