Closed rrnewton closed 9 years ago
Hm, I'm confused about how this is supposed to work. If we define 'ParThreadSafeSecretin a non-exported module in
par-classeswe can't implement
ParThreadSafeat all, because
par-classesdoesn't implement any instances. If we export
ParThreadSafeSecretin
par-classes`, then users can implement instances.
The distinction is between Control.Par.Class
(SafeHaskell Trustworthy), and Control.Par.Class.Unsafe
(SafeHaskell Unsafe).
The user can get to everything with the unsafe module, but they lose SafeHaskell Safe (inferred) status.
"Secret superclass" is a better design pattern than this current business of using an
unsafeParIO
method, which we make sure the user cannot instance themselves.Should be real easy to solve this because
unsafeParIO
uses can just be replaced withinternalLiftIO
. And it removes the confusing redundancy between those two.