Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] Generalized Algebraic Datatypes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dario Teixeira <darioteixeira@y...>
Subject: Re: [Caml-list] Re: Generalized Algebraic Datatypes
Hi,

> > While this does make sense in Haskell, in Ocaml it feels a bit
> > out of place, because you cannot, for example, partially apply
> > a type constructor.
> 
> The types above don't allow partial applications either.  They use the
> OCaml/SML style of constructors were partial application is not possible
> because the various arguments are not provided in a curried way.

That was precisely my point (I think you may have misunderstood what I said).
In Ocaml, whenever you see a curried type declaration you can safely assume
that the constructors may be partially applied.  The GADT syntax under
discussion breaks this assumption; hence my reticence.

Cheers,
Dario Teixeira