<div dir="auto"><div>You're right that the return type is more restricted than the argument, but it's in an *absolute* sense, not a relative one. It's not possible to relax `m d` to make it the same type as `c`, but it IS possible to constrain `c` to be the same as `m d`! And that's how `id` works here: the input in this case is known to be the same type as the output. You need something wrapped in a monad, and you already have that, so you just use it as-is.<br><br><div class="gmail_quote"><div dir="ltr">On Thu, Aug 9, 2018, 7:22 AM <a href="mailto:simkestuff@gmail.com">simkestuff@gmail.com</a> <<a href="mailto:simkestuff@gmail.com">simkestuff@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks, it is still a bit fuzzy to me ...</blockquote><div><br></div><div>I understand what you did  but what confuses me is that when i look at function with signature like </div><div><br></div><div>f :: Monad m => c -> m d</div><div><br></div><div>I always think that return type is somehow restricted in comparison to input because it demands that output type is wraped inside something (monad in this case).</div><div><br></div><div>For such signature to fit id signature (a -> a) ,  c type shoud be also wraped inside monad but it is not case here... </div><div><br></div><div>Anyhow, I still have to figure it out</div><div><br></div><div>thanks </div></div></div>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank" rel="noreferrer">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote></div></div></div>