Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* Strange parsing of with-clauses
@ 2004-11-29 16:26 Richard Jones
  2004-11-29 16:46 ` [Caml-list] " Alex Baretta
  2004-11-29 17:04 ` Olivier Andrieu
  0 siblings, 2 replies; 4+ messages in thread
From: Richard Jones @ 2004-11-29 16:26 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 821 bytes --]

Not a big problem, but strange nevertheless:

# exception E of string * string;;
exception E of string * string
# let f () = raise (E ("a", "b"));;
val f : unit -> 'a = <fun>
# try f (); failwith "Not found" with E (a,b) -> (a,b);;
- : string * string = ("a", "b")
# try f (); failwith "Not found" with E t -> t;;
                                       ---
The constructor E expects 2 argument(s), but is here applied to 1 argument(s)

(In my actual code I want to return the thrown tuple to the caller).

Rich.

-- 
Richard Jones.  http://www.annexia.org/  http://www.j-london.com/
>>>   http://www.team-notepad.com/ - collaboration tools for teams   <<<
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
Use Perl libs in OCaml - http://www.merjis.com/developers/perl4caml

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-11-29 19:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-29 16:26 Strange parsing of with-clauses Richard Jones
2004-11-29 16:46 ` [Caml-list] " Alex Baretta
2004-11-29 17:04 ` Olivier Andrieu
2004-11-29 19:41   ` Stefan Monnier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox