[TYPES] breaking abstraction with ML exceptions

François Pottier francois.pottier at inria.fr
Wed Mar 28 10:04:27 EDT 2018


Hi Sam,

Le 28/03/2018 à 15:20, Sam Lindley a écrit :
> My motivation is understanding how this kind of pattern interacts with 
> various designs for effect type systems that track exceptions - and 
> whether one could perhaps get away with forbidding it.

In OCaml, it might seem tempting to forbid the exception-aliasing
declaration, "exception A = B". But I believe that that still would not 
be sufficient
to eliminate exception aliasing, by which I mean the possibility that
a single (dynamic) exception is known under two distinct (static) names.
This is due to other language features that introduce aliasing, such
as module aliasing declarations ("module A = B") and first-class
modules (a function that expects two first-class modules as arguments
can be applied twice to the same module).

-- 
François Pottier
francois.pottier at inria.fr
http://gallium.inria.fr/~fpottier/


More information about the Types-list mailing list