> Well, how about the following little circular program?
>
> paths :: () -> [Path]
> paths () = let r = T : branch r in r
>
> As far as I can understand what you are looking for, I think
> this meets
> the bill. Every use of the expression `paths ()' will re-evaluate
> the infinite structure to the extent its context requires it, and the
> expanded value will be thrown away as soon as the value of this
> instance of `paths ()' is no longer required.
You can't rely on adding dummy arguments to cause re-evaluation:
full-laziness (enabled when optimisation is on in GHC) will do the
opposite transformation.
Cheers,
Simon
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell