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
circular types?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Chris Hecker <checker@d...>
Subject: circular types?

How do I do this:

type foo = B of bar
type bar = F of foo

That is, I want two types to refer to each other.  I thought putting a 

type bar

above foo would do it, but that's an abstract type now, and when I redefine it I get a different type?