Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] Error Reporting
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Frank Atanassow <franka@c...>
Subject: Re: [Caml-list] Error Reporting
David McClain wrote (on 27-09-01 13:36 -0700):
> In a tail call, and all continuations are tail calls, there is no record of
> past history -- hence no trail of continuation frames. I can easily report
> the location of the present error, but there is no history to report.

There must be a past history, or otherwise you would not be able to implement
function application.

Let's make a distinction between continuations and tail calls. Really, it
sounds like you are only _representing_ continuations in the source language
as tail calls in the target language. So in the target language, the two are
identified, but when you are compiling the source, you know which
continuations are tail-recursive calls in the source language, and which are
only functional returns. In the code you emit, i.e., in the target
language, you can thus distinguish these two types of continuations, and when an
error occurs, traverse the continuations which represent functional returns,
which should eventually lead to the prime mover, the entire program's
continuation.

-- 
Frank Atanassow, Information & Computing Sciences, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-3261 Fax +31 (030) 251-379
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr