+let string_of_generated = function
+ | `Generated -> "Generated"
+ | `Provided -> "Provided"
+;;
+
+let string_of_flavour = function
+ | `Definition -> "Definition"
+ | `Fact -> "Fact"
+ | `Lemma -> "Lemma"
+ | `Theorem -> "Theorem"
+ | `Corollary -> "Corollary"
+ | `Example -> "Example"
+;;
+
+let string_of_pragma = function
+ | `Coercion _arity -> "Coercion _"
+ | `Elim _sort -> "Elim _"
+ | `Projection -> "Projection"
+ | `InversionPrinciple -> "InversionPrinciple"
+ | `Variant -> "Variant"
+ | `Local -> "Local"
+ | `Regular -> "Regular"
+;;
+
+let string_of_fattrs (g,f,p) =
+ String.concat ","
+ [ string_of_generated g; string_of_flavour f; string_of_pragma p ]
+;;
+