* Pretty printing Toploop errors?
@ 2006-07-09 18:33 Geoffrey Alan Washburn
2006-07-10 10:54 ` [Caml-list] " Richard Jones
0 siblings, 1 reply; 3+ messages in thread
From: Geoffrey Alan Washburn @ 2006-07-09 18:33 UTC (permalink / raw)
To: caml-list
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!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Pretty printing Toploop errors?
2006-07-09 18:33 Pretty printing Toploop errors? Geoffrey Alan Washburn
@ 2006-07-10 10:54 ` Richard Jones
0 siblings, 0 replies; 3+ messages in thread
From: Richard Jones @ 2006-07-10 10:54 UTC (permalink / raw)
To: Geoffrey Alan Washburn; +Cc: caml-list
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Pretty printing Toploop errors?
@ 2006-07-10 10:06 Keiko Nakata
0 siblings, 0 replies; 3+ messages in thread
From: Keiko Nakata @ 2006-07-10 10:06 UTC (permalink / raw)
To: caml-list
> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-07-10 10:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-09 18:33 Pretty printing Toploop errors? Geoffrey Alan Washburn
2006-07-10 10:54 ` [Caml-list] " Richard Jones
2006-07-10 10:06 Keiko Nakata
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox