From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id C158D7F616 for ; Thu, 23 Feb 2017 17:31:29 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=ivg@ieee.org; spf=Pass smtp.mailfrom=ivg@ieee.org; spf=None smtp.helo=postmaster@mail-it0-f41.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of ivg@ieee.org) identity=pra; client-ip=209.85.214.41; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ivg@ieee.org"; x-sender="ivg@ieee.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of ivg@ieee.org designates 209.85.214.41 as permitted sender) identity=mailfrom; client-ip=209.85.214.41; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ivg@ieee.org"; x-sender="ivg@ieee.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-it0-f41.google.com) identity=helo; client-ip=209.85.214.41; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ivg@ieee.org"; x-sender="postmaster@mail-it0-f41.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3As59usRCKhm5GgvBH6j4YUyQJP3N1i/DPJgcQr6Af?= =?us-ascii?q?oPdwSPryoMbcNUDSrc9gkEXOFd2CrakV1qyP4+uwBiQp2tWoiDg6aptCVhsI24?= =?us-ascii?q?09vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7?= =?us-ascii?q?Ovr6GpLIj8Swyuu+54Dfbx9GiTe5Yb5+Ngi6oAbeusQVg4ZpN7o8xAbOrnZUYe?= =?us-ascii?q?pd2HlmJUiUnxby58ew+IBs/iFNsP8/9MBOTLv3cb0gQbNXEDopPWY15Nb2tRbY?= =?us-ascii?q?VguA+mEcUmQNnRVWBQXO8Qz3UY3wsiv+sep9xTWaMMjrRr06RTiu86FmQwLuhS?= =?us-ascii?q?waNTA27XvXh9Ryg6JVoByvqR9xzZPKbo6JL/dxZL/RcMkASGZdQspcVSpMCZ68?= =?us-ascii?q?YYsVCOoBOP5VoYrjp1QUqxu1GAiiBOTzyj9PmH/5wa060+U9EQHdwQctGNMOsG?= =?us-ascii?q?rbrNjuNacdT/66w7fSwTXEdfNW1i7w5Y7VeR4iufGBRax8fdbVxEU1FA7Ijk+c?= =?us-ascii?q?pZL4Mz6azOgAvHWX4ux9Xuy1kWEnsRt+oj23y8cslIbJgoUVx0jB9SpjwYY1Ic?= =?us-ascii?q?S0SE9nYdK4CZdQuS6XO5ZsTsMtRGFovyk6yrkYtpKhYCcKz5Enywbea/yBbYeI?= =?us-ascii?q?/gruWPiNLTp8nn5oe7Kyiwys/US9xeDwTMa53EtSoipAiNbMt3QN1xLJ6siAT/?= =?us-ascii?q?tw5kah2SiA1w3I6+FLP147mrTBJ54m2L4wmYIfsV7fES/uhEX2kKiWe1049eey?= =?us-ascii?q?7uTnZqzqppudN49vlgHzKb8um8y6AeQgKAcCRWmb+eKm1L3i50L1WrtKjudl2p?= =?us-ascii?q?Xe5azdIIwhp6K2DkcBzoEmrRT5FTaq39lbmXgcMHpKfxWIi4XsMlDKZvv/CKHs?= =?us-ascii?q?rU6rlWJK2fnAdpLmHpLTJXjCjKypKbdj5GZdxQc+i9dF6MQHWfk6PPvvVxqp55?= =?us-ascii?q?TjBRgjPlnszg=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BZAACdDa9YhinWVdFdGwEBAQMBAQEJA?= =?us-ascii?q?QEBFwEBBAEBCgEBhQ8Hg1SKCJFakAiFLIINhiICgxwHPxgBAQEBAQEBAQEBARI?= =?us-ascii?q?BAQEICwsKHS+CMyCCHgEEASMEGQEBNwEECwsEBzcCAiISAQUBHAYTCIgAA4FSA?= =?us-ascii?q?wgFCKF9P4sbaIFsOoMIAQEFhCQNg34BAQEBAQEEAQEBAQEBGggShjqEb4JRhQm?= =?us-ascii?q?CX49Sf4tIkiSREZFhFB6BFR+BOGEIPhcFhCAgggsiNQGLRQEBAQ?= X-IPAS-Result: =?us-ascii?q?A0BZAACdDa9YhinWVdFdGwEBAQMBAQEJAQEBFwEBBAEBCgE?= =?us-ascii?q?BhQ8Hg1SKCJFakAiFLIINhiICgxwHPxgBAQEBAQEBAQEBARIBAQEICwsKHS+CM?= =?us-ascii?q?yCCHgEEASMEGQEBNwEECwsEBzcCAiISAQUBHAYTCIgAA4FSAwgFCKF9P4sbaIF?= =?us-ascii?q?sOoMIAQEFhCQNg34BAQEBAQEEAQEBAQEBGggShjqEb4JRhQmCX49Sf4tIkiSRE?= =?us-ascii?q?ZFhFB6BFR+BOGEIPhcFhCAgggsiNQGLRQEBAQ?= X-IronPort-AV: E=Sophos;i="5.35,198,1484002800"; d="scan'208,217";a="214509140" Received: from mail-it0-f41.google.com ([209.85.214.41]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 23 Feb 2017 17:31:28 +0100 Received: by mail-it0-f41.google.com with SMTP id 203so182537457ith.0 for ; Thu, 23 Feb 2017 08:31:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Y9z8pWhVph3LV+uSXypCLZBpsVKyV0r8H5mZk6UpIOs=; b=wz606qT17Q2+nqXUI9/EQDaSmj2Rs4I/Ll3bNl7HX5sw4yn2Ov1p2N4EAOx7jyKlpc t+6bCHl5NP1dG0dWziquVQ2o+M4dLgNivYOpZaBm4Fu1XTxUjJQOCPmIPVlijo6/CEKX MlfsauzTyFO8jMqqQxf58HQMdOVuSNpjufymSGLexK7FXpYx4u2a7PNIAVg9ZL+zhey9 1nyblHhJJObAEv/cFizAa8rYjunzO7WffSuZ2z7IUq+Lu2qdxWns+hBV4rxW8VRA5pgp 55pJmVOQk5ad1qMCJclA1fJA0baFmOfX4eqaq+pL45MJUhQOczfKyA6XaIaotVSEpxfx B3Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Y9z8pWhVph3LV+uSXypCLZBpsVKyV0r8H5mZk6UpIOs=; b=lXWmGwP68Q/HkxNDwEErsGXDCc/F5+tlBKsE2doDQpuWPDhqcD0ItIOnnU6Cszc7Nx 8Hg6QIjAlp6kGU9LSzkwwCZWqU7/6mHs6MALTtRmhrMG1SbOFS891Jvh0EbglFz+YN3T QUt/XHL6KIvqprqcsC7tsUDQd3S/1GEM/7HjLBvcL/BiRAsu2A0TNoq+FiEi8Ecjareo Fu49UC6hLZpxPG1J51tsrZWbrfLhUpojYHyKnHj2xrf/S16C0sFBhdmiFCeDEm7F1BY3 Jc1g0eNr+xfkiOmM7WDXlmxDrH4uLlZxgSrASWh98F1Mkyk+9lrWoLgV/WvILv+ykTIU NuFw== X-Gm-Message-State: AMke39llrJRuyVLhdo3WPc6lu4BQV8H/IXMYLCrB0sZ3J2dqXIZBbVnsCFWBDl2onZZfFnIqnBxX1E1/ZoP3Fyy8 X-Received: by 10.36.175.83 with SMTP id l19mr3581441iti.90.1487867485908; Thu, 23 Feb 2017 08:31:25 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.46.224 with HTTP; Thu, 23 Feb 2017 08:31:25 -0800 (PST) In-Reply-To: References: From: Ivan Gotovchits Date: Thu, 23 Feb 2017 11:31:25 -0500 Message-ID: To: Tom Ridge Cc: caml-list Content-Type: multipart/alternative; boundary=f403045dadc6f89d58054935247c Subject: Re: [Caml-list] OCamldebug --f403045dadc6f89d58054935247c Content-Type: text/plain; charset=UTF-8 Probably it is an abstract type, that is represented as string. In any case you can use the `#install_printer` directive to enable printing any type. The argument is a function of type `t -> Format.formatter -> unit`, where `t` is a name of your type. On Thu, Feb 23, 2017 at 11:24 AM, Tom Ridge wrote: > Dear All, > > I am debugging some code. For various reasons I have started to use > ocamldebug rather than printf. > > I should say that ocamldebug is excellent. Really excellent. Especially > the "backwards" stepping. > > However, sometimes I want to see the value of a particular variable. I can > use the "p" (print) command as: > > (ocd) p kra > kra: Key_value_types.key = > > The problem is that I know that kra is a string. But ocamldebug only shows > . > > Admittedly the code is functorized. But I have a feeling I should be able > to tweak something to get ocamldebug to print the value of kra. > > Any ideas? > > T > --f403045dadc6f89d58054935247c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Probably it is an abstract type, that is represented as st= ring. In any case you can use the `#install_printer` directive to enable pr= inting any type. The argument
is a function of type `t -> Format.for= matter=C2=A0-> unit`, where `t` is a name of your type.=C2=A0

On Thu, Feb 23, = 2017 at 11:24 AM, Tom Ridge <tom.j.ridge+list@googlemail.com= > wrote:
D= ear All,

I am debugging some code. For various reasons I= have started to use ocamldebug rather than printf.

I should say that ocamldebug is excellent. Really excellent. Especially t= he "backwards" stepping.

However, someti= mes I want to see the value of a particular variable. I can use the "p= " (print) command as:

(ocd) p kra
<= div>kra: Key_value_types.key =3D <abstr>

The problem is that I know that kra is a string. But ocamldebug only sho= ws <abstr>.=C2=A0

Admittedly the code is fun= ctorized. But I have a feeling I should be able to tweak something to get o= camldebug to print the value of kra.

Any ideas?

T

--f403045dadc6f89d58054935247c--