Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Checked exceptions and type inference
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-03-12 (05:41)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: [Caml-list] Checked exceptions and type inference
From: Brian Hurt <>

> Java treats checked exceptions as part of the type signature of the 
> function.  As such, it seems to me that as such, type inference would work 
> to propogate most of this information in a more convient way.
> Is there any research on using checked exceptions in an ML derived 
> language?  Any plans/opinions on implementing checked exceptions in Ocaml?

I'm not sure it is exactly what you are looking for, but Francois
Pessaux wrote a PhD thesis (and also implemented it) on "static
analysis to detect uncaught exceptions in Objective Caml". IIRC, you
need to declare nothing, the checker tells you what exceptions can
happen at any point of the program.

I suppose the same technology could also be used in a more defensive
manner: checking that only specified exceptions can come out of a
function for instance.

Jacques Garrigue

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: