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
[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: 2003-02-03 (15:09)
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 Archives:
Bug reports: FAQ:
Beginner's list: