comparison src/cjr_print.sml @ 1298:e665527fce1c

Support empty datatypes, which can now be generated via 'variant []'
author Adam Chlipala <adam@chlipala.net>
date Thu, 09 Sep 2010 12:42:25 -0400
parents 929981850d9d
children d2ad997ca157
comparison
equal deleted inserted replaced
1297:41484478a32d 1298:e665527fce1c
2009 space, 2009 space,
2010 string ("__uwe_" ^ ident x ^ "_" ^ Int.toString n), 2010 string ("__uwe_" ^ ident x ^ "_" ^ Int.toString n),
2011 space, 2011 space,
2012 string "{", 2012 string "{",
2013 space, 2013 space,
2014 p_list_sep (box [string ",", space]) (fn (x, n, _) => 2014 case xncs of
2015 string ("__uwc_" ^ ident x ^ "_" ^ Int.toString n)) xncs, 2015 [] => string ("__uwec_" ^ ident x ^ "_" ^ Int.toString n)
2016 | _ =>
2017 p_list_sep (box [string ",", space]) (fn (x, n, _) =>
2018 string ("__uwc_" ^ ident x ^ "_" ^ Int.toString n)) xncs,
2016 space, 2019 space,
2017 string "};"] 2020 string "};"]
2018 | p_one (Option, _, _, _) = box [] 2021 | p_one (Option, _, _, _) = box []
2019 | p_one (Default, x, n, xncs) = 2022 | p_one (Default, x, n, xncs) =
2020 let 2023 let