Behavior of touch#

Brandon Simmons brandon.m.simmons at gmail.com
Mon Dec 15 21:21:51 UTC 2014


The `primitive` package exports a lifted version of the undocumented `touch#`

    http://hackage.haskell.org/package/ghc-prim-0.3.1.0/docs/GHC-Prim.html

which has type:

    touch :: PrimMonad m => a -> m ()

I'd like to know if this works correctly in general, or will it suffer
from the same gotches w/r/t unboxing as with addFinalizer and Weak
references? i.e. must it only be passed an unboxed type?

Brandon


More information about the Glasgow-haskell-users mailing list