[bitc-dev] Haskell question: exceptions
Swaroop Sridhar
swaroop.sridhar at gmail.com
Thu Aug 11 23:02:09 EDT 2005
Jonathan S. Shapiro wrote:
> Swaroop: can you post the other cases to illustrate what is puzzling us?
Objective Caml version 3.08.3
# let id = function x -> x;;
val id : 'a -> 'a = <fun>
# [];;
- : 'a list = []
# exception Xn;;
exception Xn
# let p = if true then id else id;;
val p : 'a -> 'a = <fun>
# let q = if true then id else raise Xn;;
val q : '_a -> '_a = <fun>
# let r = if true then [] else raise Xn;;
val r : 'a list = []
More information about the bitc-dev
mailing list