[Haskell-cafe] loop problem

Taylor Hedberg t at tmh.cc
Sat May 10 15:48:50 UTC 2014


On Sat, May 10, 2014 at 8:41 AM, Roelof Wobben <r.wobben at home.nl> wrote:
>
>  but now I see these errors :
>
>
>    -  Main.hs at 8:19-8:23
>    No instance for (Show (a0 -> a0)) arising from a use of `show'
>    Possible fix: add an instance declaration for (Show (a0 -> a0)) In the
>    first argument of `putStrLn', namely `(show x)' In a stmt of a 'do' block:
>    putStrLn (show x) In the expression: do { let x n = n * n; putStrLn (show
>    n); putChar ' '; putStrLn (show x); loop (n + 1) }
>
> Think about what type x has.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140510/7f011dfb/attachment.html>


More information about the Haskell-Cafe mailing list