diff options
Diffstat (limited to 'library')
| -rw-r--r-- | library/decl_kinds.ml | 15 | ||||
| -rw-r--r-- | library/decl_kinds.mli | 10 |
2 files changed, 25 insertions, 0 deletions
diff --git a/library/decl_kinds.ml b/library/decl_kinds.ml index 735a8fb074..03b14e31cd 100644 --- a/library/decl_kinds.ml +++ b/library/decl_kinds.ml @@ -112,3 +112,18 @@ let strength_of_global = function let string_of_strength = function | Local -> "Local" | Global -> "Global" + + +(* Recursive power *) + +(* spiwack: this definition might be of use in the kernel, for now I do not + push them deeper than needed, though. *) +type recursivity_kind = + | Finite (* = inductive *) + | CoFinite (* = coinductive *) + | BiFinite (* = non-recursive, like in "Record" definitions *) + +(* helper, converts to "finiteness flag" booleans *) +let recursivity_flag_of_kind = function + | Finite | BiFinite -> true + | CoFinite -> false diff --git a/library/decl_kinds.mli b/library/decl_kinds.mli index 7aa1df0c9a..e42cb9621d 100644 --- a/library/decl_kinds.mli +++ b/library/decl_kinds.mli @@ -82,3 +82,13 @@ val string_of_definition_kind : val strength_of_global : global_reference -> locality val string_of_strength : locality -> string + +(* About recursive power of type declarations *) + +type recursivity_kind = + | Finite (* = inductive *) + | CoFinite (* = coinductive *) + | BiFinite (* = non-recursive, like in "Record" definitions *) + +(* helper, converts to "finiteness flag" booleans *) +val recursivity_flag_of_kind : recursivity_kind -> bool |
