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] opaque polymorphism
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Francois Pottier <Francois.Pottier@i...>
Subject: Re: [Caml-list] opaque polymorphism

Hello Charles,

You can write:
  type ('a, 'b, 'c) internal_t = { ... }

  type ('a, 'c) t = ('a, <some type>, 'c) internal_t

  type ('a, 'c) t

So ``hiding the polymorphism in 'b'' can be done, but you have to tell
the compiler which internal type should be used instead of 'b, i.e. you
have to choose <some type>. I guess the unit type will do in most

Hope this helps,

François Pottier
Bug reports:  FAQ:
To unsubscribe, mail  Archives: