From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 314C1BBBC for ; Mon, 10 Jul 2006 12:06:34 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k6AA6XEE009837 for ; Mon, 10 Jul 2006 12:06:33 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA17895 for ; Mon, 10 Jul 2006 12:06:32 +0200 (MET DST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k6AA6QJ7024850 for ; Mon, 10 Jul 2006 12:06:27 +0200 Received: from localhost (orion [130.54.16.5]) by kurims.kurims.kyoto-u.ac.jp (8.13.7/8.13.6) with ESMTP id k6AA6N4f000702 for ; Mon, 10 Jul 2006 19:06:26 +0900 (JST) Date: Mon, 10 Jul 2006 19:06:23 +0900 (JST) Message-Id: <20060710.190623.74192572.keiko@kurims.kyoto-u.ac.jp> To: caml-list@inria.fr Subject: Re: [Caml-list] Pretty printing Toploop errors? From: Keiko Nakata X-Mailer: Mew version 4.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 44B226A9.004 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 44B226A2.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; toploop:01 toploop:01 pcaml:01 uncaught:01 typecore:01 compiler:01 caml-list:01 exception:01 exception:01 compile:01 hooks:03 driver:04 useful:08 useful:08 i'm:08 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 > I'm trying to use Toploop within a program I'm working on and some code >I'm feeding it is causing a type error. Unfortunately, the best I've >been able to figure out is to use Toploop.print_exception_outcome or >Pcaml.report_error which just tell me > > > Uncaught exception: Typecore.Error (_, _) > > >Are there any hooks for printing out a useful type error message? Or am >I going to need to compile directly against the type-checking code from >the compiler? Thanks! Take a look at driver/errors.ml. It may be useful. Hope this helps, Keiko.