natural component order
authorblanchet
Wed, 28 Aug 2013 18:44:50 +0200
changeset 53223 79e5b668f716
parent 53222 8b159677efb5
child 53224 f13c49dd9805
natural component order
src/HOL/BNF/Tools/bnf_fp_util.ML
--- a/src/HOL/BNF/Tools/bnf_fp_util.ML	Wed Aug 28 18:44:50 2013 +0200
+++ b/src/HOL/BNF/Tools/bnf_fp_util.ML	Wed Aug 28 18:44:50 2013 +0200
@@ -352,7 +352,7 @@
 fun co_prefix fp = (if fp = Greatest_FP then "co" else "");
 
 fun add_components_of_typ (Type (s, Ts)) =
-    fold add_components_of_typ Ts #> cons (Long_Name.base_name s)
+    cons (Long_Name.base_name s) #> fold_rev add_components_of_typ Ts
   | add_components_of_typ _ = I;
 
 fun base_name_of_typ T = space_implode "_" (add_components_of_typ T []);