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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alain.Frisch@e...
Subject: Re: [Caml-list] Feature request.
On Wed, 9 Apr 2003, Jean-Christophe Filliatre wrote:

> In SML, there used to be  local exceptions (exception E in ...) and it
> was breaking type soundness, since an exception could obviously escape
> the scope  of its declaration

What kind of type unsoundness ?  A local exception cannot be matched
outside its scope (except by match-all pattern, of course), and that's
all.

> I guess  that with a  "type ... in"  construct, a type  could probably
> escape its scope the same  way, leading to serious issues in assigning
> legal types to expressions.

This is exactly the same issue as for local modules, and OCaml can detect
it.

# let module A = struct type t = X end in A.X;;
This `let module' expression has type A.t
In this type, the locally bound module name A escapes its scope

-- Alain

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