haskell - Understanding `System.ZMQ4.Monadic`'s `forall` in Signature -


looking @ runzmq system.zmq4.monadic:

what meaning of type signature?

λ: :t runzmq  runzmq   :: transformers-0.4.2.0:control.monad.io.class.monadio m =>      (forall z. zmq z a) -> m 

in particular, don't understand forall.

from zqm docs:

the zmq monad modeled after st , encapsulates context. uses uninstantiated type variable z distinguish different invoctions of runzmq , prevent unintented use of sockets outside scope. cf. paper of john launchbury , simon peyton jones lazy functional state threads.

so z parameter acts s parameter in st s a.

one explanation of st monad haskell wiki:

https://wiki.haskell.org/monad/st


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -