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
Polymorphic variants in the debugger
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-09-30 (04:56)
From: Jacques Garrigue <garrigue@m...>
Subject: Re: [Caml-list] Polymorphic variants in the debugger
From: Christian Stork <>

> What does it mean if the debugger prints a polymorphic variable as 
> (ocd) print v
> v : [> `SomeVariantType.... ] 
>   = <variant>
> instead of its concrete content?  Is the debugger lacking some
> information?  I know that for simple programs the debugger prints the
> concrete value.

It is the same phenomenon as
  v : 'a = <poly>

Namely, due to polymorphism, the debugger only knows about part of the
possible tags for v. If the actual tag is not in this list, it will
only print <variant>.

Jacques Garrigue