Mercurial > urweb
diff src/cjr_print.sml @ 1257:fd1a49b51db5
Fix C-mangling of datatype names
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 16 May 2010 15:34:24 -0400 |
parents | 69f1d39d3f2d |
children | be2ef50780ed |
line wrap: on
line diff
--- a/src/cjr_print.sml Sat May 15 12:52:34 2010 -0400 +++ b/src/cjr_print.sml Sun May 16 15:34:24 2010 -0400 @@ -79,7 +79,7 @@ | TDatatype (Enum, n, _) => (box [string "enum", space, - string ("__uwe_" ^ #1 (E.lookupDatatype env n) ^ "_" ^ Int.toString n)] + string ("__uwe_" ^ ident (#1 (E.lookupDatatype env n)) ^ "_" ^ Int.toString n)] handle CjrEnv.UnboundNamed _ => string ("__uwd_UNBOUND__" ^ Int.toString n)) | TDatatype (Option, n, xncs) => (case ListUtil.search #3 (!xncs) of @@ -93,7 +93,7 @@ | TDatatype (Default, n, _) => (box [string "struct", space, - string ("__uwd_" ^ #1 (E.lookupDatatype env n) ^ "_" ^ Int.toString n ^ "*")] + string ("__uwd_" ^ ident (#1 (E.lookupDatatype env n)) ^ "_" ^ Int.toString n ^ "*")] handle CjrEnv.UnboundNamed _ => string ("__uwd_UNBOUND__" ^ Int.toString n)) | TFfi (m, x) => box [string "uw_", p_ident m, string "_", p_ident x] | TOption t =>