Skip to content

Add unsafeThaw to Data.Array.ST? #118

Closed
@hdgarrood

Description

@hdgarrood

I would like to be able to create an array using one of the existing functions for immutable arrays (e.g. range), and then use it locally within a function, but not return a reference to it. I would also like to be able to do this with a minimum of copying. Currently I think the best I can do is to use thaw or withArray, which make a copy of it; if I know that no references to my array can escape I should be able to get away without copying it. Could we possibly add an unsafeThaw, which has the same type as thaw but just returns a reference to the same array instead of copying?

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