diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-06-22 10:21:38 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-06-22 10:21:38 -0400 |
commit | 3b6cb47aff3c43b36945c1558eb21d3c7661a9c4 (patch) | |
tree | 4570f1ce1befeaa15dd6b15de8768925b097c0eb /src/cjr_print.sml | |
parent | d60f854fc35ce30fb698f3d8e87b88938001fdaf (diff) |
FFI through cjrize
Diffstat (limited to 'src/cjr_print.sml')
-rw-r--r-- | src/cjr_print.sml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml index c49d934e..0f924a93 100644 --- a/src/cjr_print.sml +++ b/src/cjr_print.sml @@ -63,6 +63,7 @@ fun p_typ' par env (t, loc) = | 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 @@ fun p_exp' par env (e, _) = | 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 "(", |