Some issues:
- One needs to separate exceptions into two groups, the ones that you
are actually interested in typing (their purpose is to kill the program,
so to speak) and the ones that you are not (they are actually used for
control flow).
- I'm not sure it is easy to infer. For instance, in:
let f g =
g 1
should we just assume that g raises nothing?
Or should we use some kind
of row variable, like:
let f (g: 'a raise ([< ] as 'raises): 'b raise 'raises =
g 1
But then what about:
let f
(g: 'a raise ([< ] as 'raises_h)
(h: 'a raise ([< ] as 'raises_g): 'b raise [ 'raises_g | 'raises_h ] =
g 1 + h 2
is it sound to have those abstract union types [ 'raises_g | 'raises_h ]?
Do we want all functions to have these convoluted types?
--
Romain Bardou
--
Caml-list mailing list. Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs