[Haskell-cafe] How does one read complicated type signatures?
Jakub Arnold
darthdeus at gmail.com
Fri Jan 24 03:54:35 UTC 2014
Hello world,
I’ve just started playing with the http-conduit package and started inspecting type signatures of some of the functions, and I stumbled upon many things that look like this
*Main Network.HTTP.Conduit> :t withManager
withManager
:: (monad-control-0.3.2.2:Control.Monad.Trans.Control.MonadBaseControl
IO m,
transformers-0.3.0.0:Control.Monad.IO.Class.MonadIO m) =>
(Manager
-> resourcet-0.4.10:Control.Monad.Trans.Resource.Internal.ResourceT
m a)
-> m a
The question is … how am I supposed to read these? It seems that they wrap around (maybe) 80 characters, which makes them unreadable … and the package prefixes also don’t really help.
I’d like to point out here that I’m really a noob without any practical experience in Haskell, I’ve just read a few books. So I don’t have a problem understanding the concepts, but more and more often I find myself struggling just to read the type signature correctly
Thanks for any tips, Jakub
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140124/adfb9402/attachment.html>
More information about the Haskell-Cafe
mailing list