Mercurial > urweb
diff src/export.sml @ 732:5819fb63c93a
Effectness analysis
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 16 Apr 2009 15:29:39 -0400 |
parents | e0dd85ea58e1 |
children | 5ccb67665d05 |
line wrap: on
line diff
--- a/src/export.sml Thu Apr 16 14:49:25 2009 -0400 +++ b/src/export.sml Thu Apr 16 15:29:39 2009 -0400 @@ -27,6 +27,9 @@ structure Export = struct +open Print.PD +open Print + datatype effect = ReadOnly | ReadWrite @@ -36,4 +39,15 @@ | Action of effect | Rpc of effect +fun p_effect ef = + case ef of + ReadOnly => string "r" + | ReadWrite => string "rw" + +fun p_export_kind ck = + case ck of + Link => string "link" + | Action ef => box [string "action(", p_effect ef, string ")"] + | Rpc ef => box [string "rpc(", p_effect ef, string ")"] + end