Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Troubles with marshaled/unmarshaled exception
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-12-04 (15:46)
From: Artem Prisyznuk <tema@s...>
Subject: [Caml-list] Troubles with marshaled/unmarshaled exception

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');;


	Matching OK
	Matching Fail
       e = e' is true

So second call print missing value.

Artem Prysyznuk

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: