Browse thread
Exception Unix_error problem in toplevel
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Bob Williams <a6b37331@t...> |
| Subject: | Re: [Caml-list] Exception Unix_error problem in toplevel |
On Sat, Feb 03, 2007 at 10:57:50AM +0100, Gabriel Kerneis wrote: > Le Fri, 2 Feb 2007 18:29:56 -0800, Bob Williams <a6b37331@telus.net> a > ?crit : > > My first impulse was to suggest that toplevel disallow the > > redefinition of anything. But Daniel has convinced me that reloading > > an object file can be useful during development. So how about this: > > when toplevel redefines an exception, the exception's tag number > > should not change. > > > > Daniel mentioned a related problem, with similar pitfalls: > > > > type t = C;; > > ... define function Foo using t ... > > type t = D;; > > ... what should we do about Foo? ... > > > > Foo is now clearly obsolete, as are any blocks on the heap that were > > constructed by C. What should be done here? > > As you said, redefinition can be useful sometimes. But in most of the > cases, it's a bug. So why not make the compiler issue a (possibly > optional) warning on redefinitions ? > > Sincerely, > -- > Gabriel Kerneis I think that is a good idea. Perhaps the warning should be issued only when the new type differs from the old type.