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 nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id E66E7BB84 for ; Mon, 10 Jul 2006 12:54:25 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k6AAsPfe031982 for ; Mon, 10 Jul 2006 12:54:25 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA14803 for ; Mon, 10 Jul 2006 12:54:24 +0200 (MET DST) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k6AAsM4p019001 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Mon, 10 Jul 2006 12:54:24 +0200 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1FztP8-0001Qi-00; Mon, 10 Jul 2006 11:54:18 +0100 Date: Mon, 10 Jul 2006 11:54:17 +0100 To: Geoffrey Alan Washburn Cc: caml-list@inria.fr Subject: Re: [Caml-list] Pretty printing Toploop errors? Message-ID: <20060710105417.GA1710@furbychan.cocan.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i From: Richard Jones X-Miltered: at nez-perce with ID 44B231E1.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 44B231DE.000 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 notepad:01 2006:98 wrote:01 caml-list:01 exception:01 exception:01 compile:01 alan:01 std:02 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 On Sun, Jul 09, 2006 at 02:33:35PM -0400, Geoffrey Alan Washburn wrote: > 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! Std.dump from Extlib will print whatever is inside the exception, although it's not very pretty. Rich. -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Team Notepad - intranets and extranets for business - http://team-notepad.com