Re: Curry Report Vers. 0.8.2

From: Michael Hanus <>
Date: Tue, 21 Mar 2006 09:54:11 +0100

Wolfgang Lux wrote:
> > as already done in the Muenster Curry Compiler.
> > However, I'll keep the definition of (==) as a primitive
> > (like in the MCC) since its direct implementation is a bit
> > more efficient than compare and it is often used in programs.
> There is a more important reason for using two different
> primitives for equality and ordering: For some types it is
> possible to check equality, but they do not have a natural
> ordering. For instance, MCC supports equality tests for
> partial applications (which seems natural given that they
> can be used in equality and disequality constraints), file
> handles, and also mutable references in the IO monad. However,
> compare will report an error at runtime when applied to
> arguments of these kinds.

This is a good point. However, instead of a runtime error,
one could also simply fail which expresses the view that "compare"
could be applied to any expression but is only defined as a total
order in ground data terms.

Best regards,


curry mailing list
Received on Di Mär 21 2006 - 12:34:24 CET

This archive was generated by hypermail 2.3.0 : Do Dez 07 2023 - 07:15:09 CET