caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Troubles with marshaled/unmarshaled exception
@ 2003-12-04 15:46 Artem Prisyznuk
  2003-12-04 18:11 ` Alex Baretta
  2003-12-05  0:14 ` Jason Hickey
  0 siblings, 2 replies; 8+ messages in thread
From: Artem Prisyznuk @ 2003-12-04 15:46 UTC (permalink / raw)
  To: caml-bugs; +Cc: caml-list

Hello,

I found strange behavior of pattern matching of
marshaled/unmarshaled exception.

Next code describe problem:

	let e = Failure "test";;
	let e' = Marshal.from_string (Marshal.to_string e []) 0;;
	let print_fun exc =
	  match exc with
	    Failure _ -> print_endline "Matching OK"
	  | exc -> print_endline "Matching Fail";;

	print_fun e;;
	print_fun e';;
       Printf.printf "e = e' is %b\n" (e=e');;

Output:

	Matching OK
	Matching Fail
       e = e' is true

So second call print missing value.

-- 
Artem Prysyznuk
tema@sit.kiev.ua

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

end of thread, other threads:[~2003-12-05  7:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-04 15:46 [Caml-list] Troubles with marshaled/unmarshaled exception Artem Prisyznuk
2003-12-04 18:11 ` Alex Baretta
2003-12-04 18:51   ` Eric C. Cooper
2003-12-04 19:05     ` Alex Baretta
2003-12-04 19:50       ` Eric C. Cooper
2003-12-04 19:14   ` Artem Prisyznuk
2003-12-05  0:14 ` Jason Hickey
2003-12-05  7:31   ` Artem Prisyznuk

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).