diff options
| author | Enrico Tassi | 2020-10-12 11:16:20 +0200 |
|---|---|---|
| committer | Enrico Tassi | 2020-11-02 10:04:48 +0100 |
| commit | 39e45f296afefc936e3a63836d7f56c482ddee7a (patch) | |
| tree | 53980cf9124b8f7a2f1e8bc706d64d3ce487912d /vernac/attributes.ml | |
| parent | 473160ebe4a835dde50d6c209ab17c7e1b84979c (diff) | |
attribute #[using] for Definition and Fixpoint
Diffstat (limited to 'vernac/attributes.ml')
| -rw-r--r-- | vernac/attributes.ml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vernac/attributes.ml b/vernac/attributes.ml index fb308fd316..c55a7928d9 100644 --- a/vernac/attributes.ml +++ b/vernac/attributes.ml @@ -224,3 +224,11 @@ let canonical_field = enable_attribute ~key:"canonical" ~default:(fun () -> true) let canonical_instance = enable_attribute ~key:"canonical" ~default:(fun () -> false) + +let uses_parser : string key_parser = fun orig args -> + assert_once ~name:"using" orig; + match args with + | VernacFlagLeaf str -> str + | _ -> CErrors.user_err (Pp.str "Ill formed uses attribute") + +let using = attribute_of_list ["using",uses_parser] |
