:s -u <CR> (<) 2
Matt Fairtlough
matt@dcs.shef.ac.uk
Mon, 22 Apr 2002 12:23:19 -0700
This is a multi-part message in MIME format.
------=_NextPart_000_001F_01C1E9F8.7C969890
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Subject line says it all, just about:
in hugs/winhugs98 (haskell98 mode), challenge the interpreter with the =
following 8 characters (not including blanks):
Prelude> :s -u
Prelude> (<) 2
and the result is not pretty...nor very useful. It has to be =
interrupted manually.
:t (<) 2 is fine, as is \x -> (<) 2 x; the problem does not occur =
without the -u flag because there is no show function for (<) 2. Of =
course, you can define one eg. using a datatype, but that doesn't cause =
a problem either. Also, (< 2) is perfectly fine, but (2 <) has the same =
problem.
the argument 2 is not special; any expression (<) e (with e an instance =
of Ord) seems to do it. Same problem if you wrap (<) e up in a =
datatype.
Am I right or? And is there a prize for the shortest bug ? =20
Matt
Matt Fairtlough
Department of Computer Science, University of Sheffield
0114 222 1826
------=_NextPart_000_001F_01C1E9F8.7C969890
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Subject line says it all, just =
about:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>in hugs/winhugs98 (haskell98 mode), =
challenge the=20
interpreter with the following 8 characters (not including =
blanks):</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Prelude> :s -u</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Prelude> (<) 2</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>and the result is not pretty...nor very =
useful. It has to be interrupted manually.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>:t (<) 2 is fine, as is \x -> =
(<) 2 x; the=20
problem does not occur without the -u flag because there is no show =
function for=20
(<) 2. Of course, you can define one eg. using a datatype, but =
that=20
doesn't cause a problem either. Also, (< 2) is perfectly fine, =
but (2=20
<) has the same problem.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>the argument 2 is not special; any =
expression=20
(<) e (with e an instance of Ord) seems to do it. Same problem =
if you=20
wrap (<) e up in a datatype.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Am I right or? And is there a =
prize for the=20
shortest bug ? </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Matt</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Matt Fairtlough</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Department of Computer Science, =
University of=20
Sheffield</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>0114 222 1826</FONT></DIV>
<DIV> </DIV></BODY></HTML>
------=_NextPart_000_001F_01C1E9F8.7C969890--