[Haskell-beginners] Lost Monad Signature
quentin.liu.0415 at gmail.com
Fri Dec 8 15:37:23 UTC 2017
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners