Arc Forumnew | comments | leaders | submitlogin
1 point by almkglor 6014 days ago | link | parent

Done and on arc2c.git

Continuation guards are not yet implemented though.

Edit: For when macros finally (!!) get into arc2c:

  (mac catch-err (expr . body)
    (givens p (pairs body)
            e (uniq)
            to-isa
            (fn (el)
              (if (no:cdr el)
                  el
                  (let (type exp) el
                    `((isa ,e ,type) ,exp))))
            clauses (mappend to-isa p)
      `(on-err
         (fn () ,expr)
         (fn (,e)
           (if ,@clauses)))))