Browse thread
Strange parsing of with-clauses
- Richard Jones
[
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: | Richard Jones <rich@a...> |
| Subject: | Strange parsing of with-clauses |
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