: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>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Prelude&gt; :s -u</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Prelude&gt; (&lt;) 2</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>and the result is not pretty...nor very =

useful.&nbsp; It has to be interrupted manually.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>:t (&lt;) 2 is fine, as is \x -&gt; =
(&lt;) 2 x; the=20
problem does not occur without the -u flag because there is no show =
function for=20
(&lt;) 2.&nbsp; Of course, you can define one eg. using a datatype, but =
that=20
doesn't cause a problem either.&nbsp; Also, (&lt; 2) is perfectly fine, =
but (2=20
&lt;) has the same problem.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>the argument 2 is not special; any =
expression=20
(&lt;) e (with e an instance of Ord) seems to do it.&nbsp; Same problem =
if you=20
wrap (&lt;) e up in a datatype.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Am I right or?&nbsp; And is there a =
prize for the=20
shortest bug ?&nbsp; </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Matt</FONT></DIV>
<DIV>&nbsp;</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>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_001F_01C1E9F8.7C969890--