The following program

class Eq a => ShowEq a where

  isEq :: a -> String

instance ShowEq Bool where

  isEq n | n == not n = "Strange"


gives:
Main> isEq True
"
Program error: {instShowEq_v1885_v1898 (Make.ShowEq instEq_v97
(instShowEq_v1885_v1898 (Make.ShowEq instEq_v97 (instShowEq_v1885_v1898
(Make.ShowEq instEq_v97 (instShowEq_v1885_v1898 (Make.ShowEq instEq_v97
(instShowEq_v1885_v1898 (Make.ShowEq instEq_v97 (instShowEq_v1885_v1898
(Make.ShowEq instEq_v97 (instShowEq_v1885_v1898 (Make.ShowEq instEq_v97
(instShowEq_v1885_v1898 (Make.ShowEq instEq_v97 .....

Obviously a cyclic term gives an infinite error message.
But why is there anything cyclic in this situation?

Cheers,
Olaf

-- 
OLAF CHITIL, Lehrstuhl fuer Informatik II, RWTH Aachen, 52056 Aachen, Germany
             Tel: (+49/0)241/80-21212; Fax: (+49/0)241/8888-217
             URL: http://www-i2.informatik.rwth-aachen.de/~chitil/

Reply via email to