5 Apr
2006
5 Apr
'06
6:32 p.m.
GHC gives: Fail: <<loop>>
Hugs gives: [(ERROR - C stack overflow
This usually means that you programmed some kind of circular definition, as in main = let x = x :: Int in print x This is not the same as a self-referential data structure like an infinite list, as in let ones = 1:ones which is perfectly okay. The "loop" in the first example happens because it starts to evaluate x, and determines that it has to know x to do the evaluation, but the evalutation of x is already under way. -- Garrett Mitchener