]> gitweb.factorcode.org Git - factor.git/commitdiff
add polymorphic stack effects to continuations:recover, attempt-all
authorJoe Groff <arcata@gmail.com>
Tue, 9 Mar 2010 02:28:19 +0000 (18:28 -0800)
committerJoe Groff <arcata@gmail.com>
Tue, 9 Mar 2010 02:36:40 +0000 (18:36 -0800)
core/continuations/continuations.factor

index 332354e302ed706b0f938057a8c4ae359cd8d08c..687f7153a175182892139173f7a573f56c518808 100644 (file)
@@ -119,7 +119,7 @@ SYMBOL: thread-error-hook
     ] when
     c> continue-with ;
 
-: recover ( try recovery -- )
+: recover ( ..a try: ( ..a -- ..b ) recovery: ( ..a error -- ..b ) -- ..b )
     [ [ swap >c call c> drop ] curry ] dip ifcc ; inline
 
 : ignore-errors ( quot -- )
@@ -130,7 +130,7 @@ SYMBOL: thread-error-hook
 
 ERROR: attempt-all-error ;
 
-: attempt-all ( seq quot -- obj )
+: attempt-all ( ... seq quot: ( ... elt -- ... obj ) -- ... obj )
     over empty? [
         attempt-all-error
     ] [