diff --git a/core/effects/effects-tests.factor b/core/effects/effects-tests.factor index 068a597994..707396b6ed 100644 --- a/core/effects/effects-tests.factor +++ b/core/effects/effects-tests.factor @@ -56,5 +56,8 @@ IN: effects.tests { ( x -- ) } [ ( a b -- ) curry-effect ] unit-test ! test unnamed types -{ ( _: fixnum -- _: float ) } [ ( :fixnum -- :float ) ] unit-test -{ ( _: union{ fixnum bignum } -- ) } [ ( :union{ fixnum bignum } -- ) ] unit-test +{ ( :fixnum -- :float ) } [ ( :fixnum -- :float ) ] unit-test +{ ( :union{ fixnum bignum } -- ) } [ ( :union{ fixnum bignum } -- ) ] unit-test + +{ "( :( :integer -- :integer ) :float -- :bignum )" } +[ ( :( :integer -- :integer ) :float -- :bignum ) unparse ] unit-test diff --git a/core/effects/effects.factor b/core/effects/effects.factor index 8765e90415..010d4d4d97 100644 --- a/core/effects/effects.factor +++ b/core/effects/effects.factor @@ -54,7 +54,12 @@ M: string effect>string ; M: object effect>string drop "object" ; M: word effect>string name>> ; M: integer effect>string number>string ; -M: pair effect>string first2-unsafe [ effect>string ] bi@ ": " glue ; +M: pair effect>string + first2-unsafe over [ + [ effect>string ] bi@ ": " glue + ] [ + nip effect>string ":" prepend + ] if ; : stack-picture ( seq -- string ) [ [ effect>string % CHAR: \s , ] each ] "" make ; diff --git a/core/effects/parser/parser.factor b/core/effects/parser/parser.factor index 46e635d289..46629023ed 100644 --- a/core/effects/parser/parser.factor +++ b/core/effects/parser/parser.factor @@ -35,7 +35,7 @@ ERROR: bad-standalone-effect obj ; dup parsing-word? [ ?execute-parsing dup length 1 = [ first ] [ bad-standalone-effect ] if - ] when "_" swap 2array ; + ] when f swap 2array ; PRIVATE> : parse-effect-token ( first? var end -- var more? )