[Haskell-cafe] Lazy cons, Stream-Fusion style?

Stephen Tetley stephen.tetley at gmail.com
Sun Jan 2 21:14:54 CET 2011


On 2 January 2011 19:54, Duncan Coutts <duncan.coutts at googlemail.com> wrote:

> In the standard stream fusion style, all stream operations are strict
> in the stream itself (that is, the pair of stepper function and
> initial state, not strict in the unfolded sequence or elements). Thus
> it is not possible to write things like:
>
>> bad_ones :: Stream Int
>> bad_ones = s where s = 1 `S.cons` s
>
> ...


Thanks Duncan and Henning again ealier.

I'll see if I can do without tight, circular definitions or change to
an inductive stream representation if I find I need them.

Best wishes

Stephen



More information about the Haskell-Cafe mailing list