@@ -357,7 +357,15 @@ var Aff = function () {
357357            if  ( bhead  ===  null )  { 
358358              attempts  =  new  Aff ( CONS ,  step ,  attempts ,  interrupt ) ; 
359359            }  else  { 
360-               attempts  =  new  Aff ( CONS ,  step ,  new  Aff ( CONS ,  new  Aff ( RESUME ,  bhead ,  btail ) ,  attempts ,  interrupt ) ,  interrupt ) ; 
360+               attempts  =  new  Aff ( CONS , 
361+                                  step , 
362+                                  new  Aff ( CONS , 
363+                                          new  Aff ( RESUME , 
364+                                                  bhead , 
365+                                                  btail ) , 
366+                                          attempts , 
367+                                          interrupt ) , 
368+                                  interrupt ) ; 
361369            } 
362370            bhead     =  null ; 
363371            btail     =  null ; 
@@ -370,9 +378,21 @@ var Aff = function () {
370378          case  BRACKET :
371379            bracketCount ++ ; 
372380            if  ( bhead  ===  null )  { 
373-               attempts  =  new  Aff ( CONS ,  step ,  attempts ,  interrupt ) ; 
381+               attempts  =  new  Aff ( CONS , 
382+                                  step , 
383+                                  attempts , 
384+                                  interrupt ) ; 
374385            }  else  { 
375-               attempts  =  new  Aff ( CONS ,  step ,  new  Aff ( CONS ,  new  Aff ( RESUME ,  bhead ,  btail ) ,  attempts ,  interrupt ) ,  interrupt ) ; 
386+               attempts  = 
387+                 new  Aff ( CONS , 
388+                         step , 
389+                         new  Aff ( CONS , 
390+                                 new  Aff ( RESUME , 
391+                                         bhead , 
392+                                         btail ) , 
393+                                 attempts , 
394+                                 interrupt ) , 
395+                         interrupt ) ; 
376396            } 
377397            bhead   =  null ; 
378398            btail   =  null ; 
@@ -455,7 +475,12 @@ var Aff = function () {
455475                result    =  util . fromRight ( step ) ; 
456476                // We need to enqueue the Release with the same interrupt 
457477                // status as the Bracket that is initiating it. 
458-                 attempts  =  new  Aff ( CONS ,  new  Aff ( RELEASE ,  attempt . _2 ,  result ) ,  attempts ,  tmp ) ; 
478+                 attempts  =  new  Aff ( CONS , 
479+                                    new  Aff ( RELEASE , 
480+                                            attempt . _2 , 
481+                                            result ) , 
482+                                    attempts , 
483+                                    tmp ) ; 
459484                // We should only coninue as long as the interrupt status has not changed or 
460485                // we are currently within a non-interruptable finalizer. 
461486                if  ( interrupt  ===  tmp  ||  bracketCount  >  0 )  { 
@@ -468,13 +493,19 @@ var Aff = function () {
468493            // Enqueue the appropriate handler. We increase the bracket count 
469494            // because it should not be cancelled. 
470495            case  RELEASE :
471-               attempts  =  new  Aff ( CONS ,  new  Aff ( FINALIZED ,  step ,  fail ) ,  attempts ,  interrupt ) ; 
496+               attempts  =  new  Aff ( CONS , 
497+                                  new  Aff ( FINALIZED , 
498+                                          step , 
499+                                          fail ) , 
500+                                  attempts , 
501+                                  interrupt ) ; 
472502              status    =  CONTINUE ; 
473503              // It has only been killed if the interrupt status has changed 
474504              // since we enqueued the item, and the bracket count is 0. If the 
475505              // bracket count is non-zero then we are in a masked state so it's 
476506              // impossible to be killed. 
477507              if  ( interrupt  &&  interrupt  !==  tmp  &&  bracketCount  ===  0 )  { 
508+                 console . log ( attempt ) 
478509                step  =  attempt . _1 . killed ( util . fromLeft ( interrupt ) ) ( attempt . _2 ) ; 
479510              }  else  if  ( fail )  { 
480511                step  =  attempt . _1 . failed ( util . fromLeft ( fail ) ) ( attempt . _2 ) ; 
0 commit comments