Scoping rules

From: Adam P. Jenkins (
Date: Sat Jun 28 1997 - 04:53:43 MET DST

Date: Fri, 27 Jun 1997 22:53:43 -0400
Message-Id: <>
From: "Adam P. Jenkins" <>
Subject: Scoping rules

        Am I right that in Caml/O'Caml, exceptions and open statements
always occur at top-level (by top-level I mean not in a let .. in
block)? What I mean is: in SML one can say

let open List
    exception LocalExc of string in
  (* in here List is open and I can use LocalExc *)

There doesn't seem to be any equivalent in Caml. Just checking if I'm
missing something. I realize that the scope of "open" and exception
can be limited to a structure, but I was looking for an even smaller
scope. Thanks.


Adam P. Jenkins

This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:11 MET