English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
exception Failure and failwith
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-06-21 (11:34)
From: luc.maranget@i...
Subject: Re: [Caml-list] exception Failure and failwith
> It's what I was afraid of.
> I got it. Anyway let me make a consideration: It would be nice to have a 
> way (a fake module named Core,for example) to access the core types, 
> exception and definitions in case someone shadows the original one.

Why not, but frankly, I am not sure this can be done easily. Besides,
this would potentially break user code, for users who happen to have a
module named 'Core'.

> exception Prim_Failure = Failure
> to get rid of any further shadowing.
Good point which I missed.

As a conclusion, it is clear that the management of the so-called
'built-ins' is somehow unfortunate, and that perhaps, not all built-ins,
need to be so.

However the behavior is properly documented and workarounds are available.

Luc Maranget