How about an implementation that sets the deepSeq'd bit *after* each field has been successfully deepSeq'd? deepSeq'ing a cyclic structure would behave just like an infinite structure.
Spencer Janssen On 4/4/06, Simon Marlow <[EMAIL PROTECTED]> wrote: > On 30 March 2006 23:12, Andy Gill wrote: > > > Implementation: > > > > deepSeq (RAW_CONS <is_deep_seq'd_bit> ... fields ) = > > if <is_deep_seq'd_bit> == True > > then return /* hey, we've already deepSeq'd this */ > > else set <is_deep_seq'd_bit> to True. > > deepSeq (field_1) > > ... > > deepSeq (field_n) > > deepSEQ (REF/MVAR...) = return > > So deepSeq doesn't return _|_ when passed a cyclic structure? This is a > bad idea, because it lets you distinguish cyclic structures from > infinite ones. deepSeq has to behave like a function, regardless of its > implementation. > > Cheers, > Simon > _______________________________________________ > Haskell-prime mailing list > Haskell-prime@haskell.org > http://haskell.org/mailman/listinfo/haskell-prime > _______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org http://haskell.org/mailman/listinfo/haskell-prime