[Haskell-beginners] main: <<loop>> ....?

Sunil S Nandihalli sunil.nandihalli at gmail.com
Mon Aug 22 10:30:55 CEST 2011


thanks a lot Daniel, I had introduced a infinite loop when I added
trace to debug my program. Thanks for taking time to look through the
code to pinpoint the error.

Sunil.

On Mon, Aug 22, 2011 at 1:54 PM, Daniel Fischer
<daniel.is.fischer at googlemail.com> wrote:
> On Monday 22 August 2011, 09:45:46, Sunil S Nandihalli wrote:
>> Hi Benjamin,
>>  It was longer than I could post here .. but here it is ..
>>
>> https://github.com/sunilnandihalli/is2/blob/master/main.hs
>
> Sorry for the line-mangling:
>
>
> advanceSweepLineTo front@(rangeToOpenTrapeziaMap,curSweepLineLocation)
> newSweepLineLocation = let delta = newSweepLineLocation -
> curSweepLineLocation
>                                                                                                  (expandedTrapezia',_)
> = expandToAdvance front newSweepLineLocation
>                                                                                                  expandedTrapezia
> = trace (" expandedTrapezia : "++show expandedTrapezia')
>                                                                                                                     $
> expandedTrapezia
>
>
> There you have an infinite loop of the simple type,
>
> expandedTrapezia = expandedTrapezia
>
> On the right hand side, you're  missing a ', should be expandedTrapezia'
>
> I don't know when you've added the trace calls, so there might well be
> another problem still.
>


More information about the Beginners mailing list