aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/export.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-16 15:29:39 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-16 15:29:39 -0400
commit55d10dd587a94d356096c2dfc39306c14b55c7bf (patch)
treefa0fcff27c8418c9e6beccbce3c846678e71f07e /src/export.sml
parent6d021ead0f73c5a28080b50a1bd08b1ab72590c9 (diff)
Effectness analysis
Diffstat (limited to 'src/export.sml')
-rw-r--r--src/export.sml14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/export.sml b/src/export.sml
index 4aae9b08..8e3e3331 100644
--- a/src/export.sml
+++ b/src/export.sml
@@ -27,6 +27,9 @@
structure Export = struct
+open Print.PD
+open Print
+
datatype effect =
ReadOnly
| ReadWrite
@@ -36,4 +39,15 @@ datatype export_kind =
| 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