comparison 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
comparison
equal deleted inserted replaced
731:e0dd85ea58e1 732:5819fb63c93a
25 * POSSIBILITY OF SUCH DAMAGE. 25 * POSSIBILITY OF SUCH DAMAGE.
26 *) 26 *)
27 27
28 structure Export = struct 28 structure Export = struct
29 29
30 open Print.PD
31 open Print
32
30 datatype effect = 33 datatype effect =
31 ReadOnly 34 ReadOnly
32 | ReadWrite 35 | ReadWrite
33 36
34 datatype export_kind = 37 datatype export_kind =
35 Link 38 Link
36 | Action of effect 39 | Action of effect
37 | Rpc of effect 40 | Rpc of effect
38 41
42 fun p_effect ef =
43 case ef of
44 ReadOnly => string "r"
45 | ReadWrite => string "rw"
46
47 fun p_export_kind ck =
48 case ck of
49 Link => string "link"
50 | Action ef => box [string "action(", p_effect ef, string ")"]
51 | Rpc ef => box [string "rpc(", p_effect ef, string ")"]
52
39 end 53 end