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:
Comments
Post a Comment