[Haskell-beginners] Lost Monad Signature

Quentin Liu quentin.liu.0415 at gmail.com
Fri Dec 8 15:37:23 UTC 2017


Hi,

The function `join` flattens a double-layered monad into one layer and its type signature is

  join :: (Monad m) => m (m a) -> m a

But when the first argument supplied is `(,)`, the type signature becomes

  join (,) :: b -> (b, b)

in ghci. The monad constraint is lost when supplied the first argument. So my question is why the type constraint is lost and what monad is supplied here.

Regards,
Qingbo Liu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20171208/21dc6445/attachment.html>


More information about the Beginners mailing list