Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] copy of parametrized object
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Stefano Zacchiroli <zack@b...>
Subject: Re: [Caml-list] copy of parametrized object
On Tue, Jun 24, 2003 at 09:36:08PM +0900, Jacques Garrigue wrote:
> famous value restriction: any function application result is
> non-polymorphic, and an object construtctor is seen as a function
> application.

BTW (but surely a bit off-thread), could you remember me for which
reason object constructors are not considered functions consistently in
the ocaml language? Why is currently not possible to do:

  type foo = Foo of int | Bar of int
  List.map Foo [1; 2; 3; 4]

?

TIA,
Cheers

-- 
Stefano Zacchiroli  --  Master in Computer Science @ Uni. Bologna, Italy
zack@{cs.unibo.it,debian.org,bononia.it}  -  http://www.bononia.it/zack/
"  I know you believe you understood what you think I said, but I am not
sure you realize that what you heard is not what I meant!  " -- G.Romney

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners