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: | Gabriel Kerneis <gabriel.kerneis@e...> |
| Subject: | Re: [Caml-list] Exception Unix_error problem in toplevel |
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