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] On the equality of functional values
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-10-27 (14:11)
From: Alessandro Baretta <alex@b...>
Subject: [Caml-list] On the equality of functional values
I have been experimenting with equal signs, and I noticed 
that the equality operator (=) behaves in a strange way with 
respect to functional values.

         Objective Caml version 3.06

# (=) = (=) ;;
Exception: Invalid_argument "equal: functional value".
# let x = (=) in x = x ;;
- : bool = true

The first line seems to imply that no comparisons are 
possible between functional values. However, the second line 
I typed does not raise the same exception. This seems to 
imply that comparisons are allowed between functional 
values, too.

Now, which of two hypotheses is correct?


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