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
Re: [Caml-list] inspecting abstract values in the debugger
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-02-20 (10:04)
From: David Allsopp <dra-news@m...>
Subject: Re: [Caml-list] inspecting abstract values in the debugger
Christian Lindig wrote:
> In the debugger, abstract values cannot be inspected.

I can't experiment in the debugger as I develop under native Windows and so
use the toplevel for debugging, but won't inserting temporary Obj.magic
calls into your code to "cast" abstract values to their actual
representations help as it does in the toplevel?

e.g.

*S.mli*
type t
val make : int -> int -> t

*S.ml*
type t = int * int
let make x y = (x, y)

*Toplevel*
#load "t.cmo";;
let (t : int * int) = Obj.magic (T.make 1 2);;


David