`StablePtr` in `ST`

Matthew Farkas-Dyck strake888 at gmail.com
Tue Aug 20 21:59:49 UTC 2019


I have been doing some work where i want `StablePtr`, but also to not
be confined to `IO`. I saw the following comment in
"compiler/prelude/PrimOp.hs":

Question: Why @RealWorld@ - won't any instance of @_ST@ do the job? [ADR]

It has been there for 20 years. What is the answer? If it is safe i'll
send the patch generalizing these operations.


More information about the Glasgow-haskell-users mailing list