Looks good, although probably needs more examples, maybe some actual use cases.
On the implementation side... I notice you use (apply list 'do ...). I suspect you can probably make it a very big `(do ...) form, although you may have felt that it was getting bit complicated I guess ^^;.
For use cases: see Haskell code? :P I wrote this because I really liked them in other languages and in EOPL, and thought they might come in handy. If I come across somewhere in my Arc code where I use them (I haven't written too much new Arc recently) I'll report out.
I also wrote most of this a while ago (I think I started in March), and my coding has improved quite a bit since then, so the implementation could probably get cleaned up... :)
> If I come across somewhere in my Arc code where I use them (I haven't written too much new Arc recently) I'll report out.
Please do ^^. As an aside, it may be possible to transform the AST data structures in arc2c to tagged unions; we could transform the (if (alam ast) ... (alit ast) ...) to tcase forms. Care to try? It strikes me as a possible demonstration of your code, and may be useful to shake out bugs.
I likemaybe :) Also, it's simple and good for testing (e.g. it has a zero-ary type).
The arc2c thing sounds sensible---I have to fix a bug in tagged-union.arc first (you can't currently have a constructor with the same name as the datatype), but then I'll try to work on it.