From 55d10dd587a94d356096c2dfc39306c14b55c7bf Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Thu, 16 Apr 2009 15:29:39 -0400 Subject: Effectness analysis --- src/export.sml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/export.sml') 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 -- cgit v1.2.3