Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: [Caml-list] Checked exceptions and type inference
From: Brian Hurt <brian.hurt@qlogic.com>

> 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.

http://guinness.cs.stevens-tech.edu/~fpessaux/#My_thesis_work

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 caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners