English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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 <cstork@ics.uci.edu>

> 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