diff options
author | 2017-04-08 20:08:01 +0200 | |
---|---|---|
committer | 2017-04-25 00:30:23 +0200 | |
commit | 6eb42e53ffafd9aed3c12805c6a228acccc03827 (patch) | |
tree | b8f58445d3c03754a5514c3dbe36a1b3a502e562 | |
parent | 9122623f2377bfe6aad0d4ea662481992e768201 (diff) |
[location] Document changes.
-rw-r--r-- | dev/doc/changes.txt | 8 | ||||
-rw-r--r-- | lib/loc.mli | 5 |
2 files changed, 12 insertions, 1 deletions
diff --git a/dev/doc/changes.txt b/dev/doc/changes.txt index 7f915b781..10c3f396e 100644 --- a/dev/doc/changes.txt +++ b/dev/doc/changes.txt @@ -51,6 +51,14 @@ In Constrexpr_ops: interpreting "(x y z:_)" as "(x:_) (y:_) (z:_)" while the second ones were preserving the original sharing of the type. +Location handling has been reworked, Loc.ghost has been removed in +favor of an option type. All objects carrying a source code location +have been switched to `'a Loc.located == Loc.t option * a'`, which +should be treated as private (that is, ok to match against, but +forbidden to manually build), and is mandatory to use for objects with +location. This policy has been implemented in the whole code base, +including all the ASTs for vernacular, gallina, and tactics. + ** Ltac API ** Many Ltac specific API has been moved in its own ltac/ folder. Amongst other diff --git a/lib/loc.mli b/lib/loc.mli index 110920d5a..ec79ced5d 100644 --- a/lib/loc.mli +++ b/lib/loc.mli @@ -51,8 +51,11 @@ val raise : ?loc:t -> exn -> 'a type 'a located = t option * 'a (** Embed a location in a type *) -(** Warning, this API is experimental *) +(* We would like in the future: + * type 'a located = private { tag: t option; obj: 'a; } + *) +(** Warning, this API is experimental *) val to_pair : 'a located -> t option * 'a val tag : ?loc:t -> 'a -> 'a located val obj : 'a located -> 'a |