>Alternative design choices and avenues for improvement
Here we summarise aspects of Green Card that are less than ideal, and indicate possible improvements.
Pretty much every newtype or single-constructor declaration that is involved in a foreign language call needs a corresponding %dis definition. Maybe this %dis definition should be automated. On the other hand, there are many fewer data types than procedures, so perhaps it isn't too big a burden to define a %dis for each.
Alternatively, go the other way and have Green Card generate a Haskell type from a %dis definition, along the lines of what %enum already does.
The error handling provided by %fail is fairly rudimentary. It isn't obvious how to improve it in a systematic manner though.