[Haskell-beginners] newEmptyMVar return type
David McBride
toad3k at gmail.com
Wed Jan 6 11:37:52 UTC 2021
It means that the function can return an mvar containing any type that you
need. What type it returns depends on what type your program asks for.
On Wed, Jan 6, 2021, 01:37 Velichko Lefterov <velichko.lefterov at gmail.com>
wrote:
> OK,
> I tried this one:
>
> test:: IO (Maybe a)
> test = return Nothing
>
> It looks similar and it seems to work...
>
> On Tue, Jan 5, 2021 at 8:22 PM Velichko Lefterov <
> velichko.lefterov at gmail.com> wrote:
>
>> Hello,
>> could someone explain me simple how return-type polymorphism works
>> in the following case:
>> newEmptyMVar :: IO (MVar a) ?
>>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20210106/74e93078/attachment.html>
More information about the Beginners
mailing list