diff src/cjr_print.sml @ 53:4f641f8fddaa

FFI through cjrize
author Adam Chlipala <adamc@hcoop.net>
date Sun, 22 Jun 2008 10:21:38 -0400
parents 1c91c5e6840f
children 717b6f8d8505
line wrap: on
line diff
--- a/src/cjr_print.sml	Sun Jun 22 10:17:34 2008 -0400
+++ b/src/cjr_print.sml	Sun Jun 22 10:21:38 2008 -0400
@@ -63,6 +63,7 @@
       | TNamed n =>
         (string ("__lwt_" ^ #1 (E.lookupTNamed env n) ^ "_" ^ Int.toString n)
          handle CjrEnv.UnboundNamed _ => string ("__lwt_UNBOUND__" ^ Int.toString n))
+      | TFfi (m, x) => box [string "lw_", string m, string "_", string x]
 
 and p_typ env = p_typ' false env
 
@@ -76,6 +77,14 @@
       | ENamed n =>
         (string ("__lwn_" ^ #1 (E.lookupENamed env n) ^ "_" ^ Int.toString n)
          handle CjrEnv.UnboundNamed _ => string ("__lwn_UNBOUND_" ^ Int.toString n))
+      | EFfi (m, x) => box [string "lw_", string m, string "_", string x]
+      | EFfiApp (m, x, es) => box [string "lw_",
+                                   string m,
+                                   string "_",
+                                   string x,
+                                   string "(",
+                                   p_list (p_exp env) es,
+                                   string ")"]
       | ECode n => string ("__lwc_" ^ Int.toString n)
       | EApp (e1, e2) => parenIf par (box [p_exp' true env e1,
                                            string "(",