caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* types returned from exceptions
@ 2000-03-07 12:27 Julian Assange
  0 siblings, 0 replies; only message in thread
From: Julian Assange @ 2000-03-07 12:27 UTC (permalink / raw)
  To: caml-list; +Cc: proff


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.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-03-08 18:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-07 12:27 types returned from exceptions Julian Assange

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).