Safely reading RemoteRefs?

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Safely reading RemoteRefs?

I notice I'm able to retrieve haskell variables after a :r in ghci:

:m + Data.Binary
:m + GHCi.RemoteTypes

encodeFile "/tmp/foo" =<< mkRemoteRef "hello!"


putStrLn =<< localRef =<< decodeFile "/tmp/foo"


Is this safe? It works correctly in the common case but are there things I need to be careful of?

In the string case it's not too interesting but it would be great to e.g. retrieve the pid of a running process.


Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
Only members subscribed via the mailman list are allowed to post.