[Haskell-beginners] Avoiding stack space overflow

Bob Ippolito bob at redivi.com
Mon Jan 26 16:58:37 UTC 2015


Here are my go-to resources for Haskell's evaluation:

http://chimera.labs.oreilly.com/books/1230000000929/ch02.html#sec_par-eval-whnf
https://hackhands.com/lazy-evaluation-works-haskell/

On Mon, Jan 26, 2015 at 8:45 AM, Hans Georg Schaathun <
georg+haskell at schaathun.net> wrote:

> On Mon, Jan 26, 2015 at 09:55:03AM -0500, David McBride wrote:
> > I don't think the problem is with trainNetwork, but rather epoch.  You
> > might try adjusting your network datatype and sub datatypes in the manner
> > of data Network = Network !Int !Int until you narrow down which piece is
> > causing the problem.
>
> It turns out that you are absolutely right.
> A number of randomly inserted bang patterns got rid of the overflow.
> Thanks a lot for the idea..
>
> I feel even more clueless than I used too, but I have at least a way
> to proceed.
>
> --
> :-- Hans Georg
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20150126/e15b045d/attachment.html>


More information about the Beginners mailing list