Skip to content

Terminal.renderLazy isn't lazy #175

@georgefst

Description

@georgefst

This originally came up in discussion at cdepillabout/pretty-simple#67. Although it returns a lazy Text, there doesn't really seem to be any laziness in Data.Text.Prettyprint.Doc.Render.Terminal.renderLazy, presumably due to the use of ST.

For example, I would expect to see:

(TL.take 5 . renderLazy . fix $ SChar 'a') == "aaaaa"

but instead the left-hand-side is just .

I could submit a PR fixing this, since I've already written the code (though I haven't benchmarked it...).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions