diff options
| author | Hugo Herbelin | 2017-01-16 15:44:14 +0100 |
|---|---|---|
| committer | Hugo Herbelin | 2017-01-16 15:49:04 +0100 |
| commit | 93ee722a9612d57a7928eaeb8ccede688214d158 (patch) | |
| tree | 8ce25f61c46c6cc7596993da86b467f5f62e9efa | |
| parent | 6424a49842ed9982c7edd1b847d88d66508f072b (diff) | |
Fixing (part of) #5303 (clarifications around Record/Structure/Variant).
- We fix the inconsistency of Structure and Record which according to
doc are the same.
- We improve the error message when not using { ... } for Record or Structure.
| -rw-r--r-- | toplevel/vernacentries.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml index 41ee165ff8..6736d83293 100644 --- a/toplevel/vernacentries.ml +++ b/toplevel/vernacentries.ml @@ -570,10 +570,10 @@ let vernac_inductive poly lo finite indl = | _ -> () (* dumping is done by vernac_record (called below) *) ) indl; match indl with - | [ ( _ , _ , _ ,Record, Constructors _ ),_ ] -> - CErrors.error "The Record keyword cannot be used to define a variant type. Use Variant instead." + | [ ( _ , _ , _ ,(Record|Structure), Constructors _ ),_ ] -> + CErrors.error "The Record keyword is for types defined using the syntax { ... }." | [ (_ , _ , _ ,Variant, RecordDecl _),_ ] -> - CErrors.error "The Variant keyword cannot be used to define a record type. Use Record instead." + CErrors.error "The Variant keyword does not support syntax { ... }." | [ ( id , bl , c , b, RecordDecl (oc,fs) ), [] ] -> vernac_record (match b with Class _ -> Class false | _ -> b) poly finite id bl c oc fs |
