haskell-distributed / distributed-process-platform

DEPRECATED (Cloud Haskell Platform) in favor of distributed-process-extras, distributed-process-async, distributed-process-client-server, distributed-process-registry, distributed-process-supervisor, distributed-process-task and distributed-process-execution
http://haskell-distributed.github.com
BSD 3-Clause "New" or "Revised" License
47 stars 18 forks source link

remove potential pattern match failure for more helpful `die msg` #75

Closed tavisrudd closed 10 years ago

tavisrudd commented 10 years ago

initCall and unsafeInitCall in D.P.P.ManagedProcess.Internal.Types were both vulnerable to pattern match failure when passed an unresolvable Addressable. It is more helpful to the developer / debugger to die with unresolvableMessage addressable.

tavisrudd commented 10 years ago

It's just our convention for private: Python on the brain, etc.

tavisrudd commented 10 years ago

Would forceResolve have the same signature and behaviour? Are you thinking of a default implementation on Resolvable? If so, why not just put the function alongside Resolvable but outside the typeclass?

hyperthunk commented 10 years ago

Would forceResolve have the same signature and behaviour? Are you thinking of a default implementation on Resolvable? If so, why not just put the function alongside Resolvable but outside the typeclass?

I guess providing forceResolve outside the typeclass would make sense actually. And yes, exactly what you've written, without the underscore. Hahaha. :)

hyperthunk commented 10 years ago

Sorry for the delay - personal circumstances permitting I'll look at this again later in the week.