From: Julian Assange <proff@iq.org>
To: caml-list@pauillac.inria.fr
Cc: proff@iq.org
Subject: types returned from exceptions
Date: 07 Mar 2000 23:27:55 +1100 [thread overview]
Message-ID: <wxd7p7t16c.fsf@suburbia.net> (raw)
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.
reply other threads:[~2000-03-08 18:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wxd7p7t16c.fsf@suburbia.net \
--to=proff@iq.org \
--cc=caml-list@pauillac.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox