User-defined indexing operators: bigarray deprecated warning#339
Merged
gasche merged 4 commits intoocaml:user-defined-indexing-operatorsfrom Dec 8, 2015
Merged
Conversation
With the simplification of index operators, the expressions a.{..} are
no longer automatically resolved to Bigarray.Array[n].[g|s]et. To use
these operators, it is now necessary to bring them in scope, for
instance by opening either the Bigarray or Bigarray.Operators module.
To ease the transition period, this patch add an hack in
`typing/typetexp.ml` to catch the cases where the index operators
`.{}/.{,}..` are used without being bound in the current scope
and tranlate then to Bigarray.(..) with a deprecated warning.
This commit update the documentation on the compatibility problems
between the deprecated bigarray specific syntax extension and the new
user-defined index operators extension. In particular, this commit
describes the new deprecated warning for implicit use of the
`Bigarray(.{...})` operators and states that this warning might be
turned into an error in the undetermined futures. This commits also
amend the documentation to mention the new `Bigarray.Operators`
submodule when useful.
Change the name from customizable to user-defined index operators and fix the alignment of the latex tables for better readability.
Member
|
Excellent pull request, mergeable as is. Thanks! |
gasche
added a commit
that referenced
this pull request
Dec 8, 2015
User-defined indexing operators: bigarray deprecated warning
poechsel
pushed a commit
to poechsel/ocaml
that referenced
this pull request
Apr 1, 2021
chambart
pushed a commit
to chambart/ocaml-1
that referenced
this pull request
Jan 4, 2022
EmileTrotignon
pushed a commit
to EmileTrotignon/ocaml
that referenced
this pull request
Jan 12, 2024
Tweaks the menu text for the first two columns as well, still working on the third one. Closes ocaml#339
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The aim of this commit is to preserve source compatibility between the user-defined indexing operators and the main branch when using the
Bigarraylibrary.On the one hand, the user-defined indexing operators branch require to explicitly bring in scope the
Bigarray.( .{...} )before using them. On the other hand, in the main branch, these operators always implicitly refer to theBigarraymodule.In order to bridge the gap between these two different behaviors, this pull request introduces a temporary hack to allow implicit uses of the
Bigarray.( .{...} )index operators in the user-defined indexing operators branch. However, these implicit uses ofBigarray.( .{...} )operator trigger a deprecated warning (in the user-defined branch).This warning can be avoided by explicitly bringing in scope the corresponding
Bigarray.( .{...} )operator; for instance by opening either theBigarraymodule or theBigarray.Operatorsmodule.