Paste: errors

Author: _hrrld
Mode: factor
Date: Sat, 8 Nov 2008 15:22:57
Plain Text |
( scratchpad ) [ refresh-all ]
Loading resource:work/la/la.factor
:errors - print 4 semantic errors.
( scratchpad ) :errors

While compiling *: 

Nesting:
{ if-iterate? if-iterate? }
{ (each-integer) ~inline-recursive~ }
{ each-integer each-integer }
{ 2each 2each }
{ float2=>* float2=>* }
{ ~literal~ f }
{ ~literal~ f }
{ ~literal~ f }
{ * * }
Unbalanced branches:
[ iterate-step iterate-next (each-integer) ] ( -- object )
[ 3drop ] ( -- )

While compiling +: 

Nesting:
{ if-iterate? if-iterate? }
{ (each-integer) ~inline-recursive~ }
{ each-integer each-integer }
{ 2each 2each }
{ float2=>+ float2=>+ }
Unbalanced branches:
[ iterate-step iterate-next (each-integer) ] ( -- object )
[ 3drop ] ( -- )

While compiling float2=>*: 

Nesting:
{ if-iterate? if-iterate? }
{ (each-integer) ~inline-recursive~ }
{ each-integer each-integer }
{ 2each 2each }
{ float2=>* float2=>* }
{ ~literal~ f }
{ ~literal~ f }
{ ~literal~ f }
{ * * }
Unbalanced branches:
[ iterate-step iterate-next (each-integer) ] ( -- object )
[ 3drop ] ( -- )

While compiling float2=>+: 

Nesting:
{ if-iterate? if-iterate? }
{ (each-integer) ~inline-recursive~ }
{ each-integer each-integer }
{ 2each 2each }
{ float2=>+ float2=>+ }
Unbalanced branches:
[ iterate-step iterate-next (each-integer) ] ( -- object )
[ 3drop ] ( -- )

Annotation: 2each causes these errors.

Author: _hrrld
Mode: factor
Date: Sun, 9 Nov 2008 00:17:02
Plain Text |
! Copyright (C) 2008 _hrrld
! See http://factorcode.org/license.txt for BSD license.
USING: sequences math ;
IN: ouch

: foo { 1 2 3 } { 1 2 3 } [ + ] 2each ;

Annotation: fixxed!

Author: _hrrld
Mode: factor
Date: Sun, 9 Nov 2008 00:42:22
Plain Text |
The resolution here was to use 2map instead... [ + ] infers the wrong stack effects for 2each.

New Annotation

Summary:
Author:
Mode:
Body: