FW: Haskell 98 report
Simon Peyton-Jones
simonpj@microsoft.com
Mon, 11 Feb 2002 06:14:19 -0800
I propose to adopt Olaf's suggestion here. It makes for
a nice simple specification, even though *in principle*
data T =3D MkT deriving( Eq )
needn't have a strict (=3D=3D) operation.
It's certainly a vagueness at the moment.
Simon
-----Original Message-----
From: Olaf Chitil [mailto:olaf@cs.york.ac.uk]=20
Sent: 08 February 2002 18:50
To: Simon Peyton-Jones
Subject: Haskell 98 report
In=20
D.1 Derived instances of Eq and Ord.
there is the statement
Derived comparisons always traverse constructors from left to right.
These examples illustrate this property:=20
(1,undefined) =3D=3D (2,undefined) =3D> False
(undefined,1) =3D=3D (undefined,2) =3D> _|_
This statement makes me wonder, if for example
False <=3D undefined
should evaluate to True, because False is the least constructor.
However, all Haskell implementations yield "undefined".
To resolve this ambiguity of the report I suggest to add the sentence:
However, all derived comparisons are strict in all arguments.
--=20
OLAF CHITIL,=20
Dept. of Computer Science, The University of York, York YO10 5DD, UK.=20
URL: http://www.cs.york.ac.uk/~olaf/
Tel: +44 1904 434756; Fax: +44 1904 432767