[Haskell-beginners] Simple Continuation question

Ozgur Akgun ozgurakgun at gmail.com
Sat Jul 12 16:02:03 UTC 2014


On 12 July 2014 16:12, David McBride <toad3k at gmail.com> wrote:

> You can see that in the error message Expected type: ContT String Identity
> String, Actual type: ContT Char [] String.  The reason why it looks weird
> is that it is assuming that your monad instead of being identity is [], and
> that the r in "m r" must be a Char in order for that to work.  I'm not
> really sure why it chose list, probably type defaulting rules.
>

It is probably because String = [Char].

Notice how the first argument to ContT changes from String to Char too.

Ozgur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20140712/b2e228b8/attachment.html>


More information about the Beginners mailing list