Browse thread
types returned from exceptions
- Julian Assange
[
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: | Julian Assange <proff@i...> |
| Subject: | types returned from exceptions |
I am trying to do the following:
let f x =
let foo =
try
f2 x
with
err -> exit 1
in
..
However, there is a type conflict between (f2 x) and (exit 1). exit is defined as
int -> 'a
and seems intended to be used polymorphically for situations like this. Is there
a way of forcing the return type of exit to match that of (f2 x)? Is there a better
way of coding this type of construct?
Cheers,
Julian.