On Mon, Oct 17, 2005 at 11:52:56AM +0200, Bill Allombert wrote: > It looks like hugs segfault if you instance Show but not define a > show method and then implicitly use it: > > Let foo.hs = > --->8----- > module Fibo where > type Quad = (Integer,Integer) > newtype Gauss = Karl Quad > instance Eq Gauss where > Karl (a,b) == Karl (c,d) = a == c && b == d > instance Show Gauss where > ---8<----- > in > $ hugs fibo3.hs > Type :? for help > Fibo> Karl (1,2) > zsh: segmentation fault hugs fibo3.hs
This is an instance of Hugs segfaulting on some infinite computations (here show -> showsPrec -> show). You can do the same thing with an empty Eq instance or just let f x = g x + 1; g x = f x + 2 in f 3 The general problem is documented in the User's Guide, but I believe it's fixed in CVS version (src/machine.c 1.25 and src/prelude.h 1.79 if anyone's interested in backporting). -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]