Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Generic generic types.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Mike Potanin <potanin@m...>
Subject: [Caml-list] Generic generic types.

Haskell support types like

data Refal_atom agregat = RefalChar Char
                        | RefalInt Int
                        | RefalTerm (agregat (Refal_atom agregat))

Do OCaml support similar type?

type 'agregat refal_atom =
             Char of char
           | Int of int
           | Term of (('agregate refal_atom) 'agregat);;


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