[m-rev.] diff: Move pointer_equals/2 into the private_builtin module.
Peter Wang
novalazy at gmail.com
Fri Oct 18 15:22:33 AEDT 2013
On Fri, 18 Oct 2013 11:46:24 +1100, Paul Bone <paul at bone.id.au> wrote:
> Branches: release, master
>
> This patch was reviewed some time ago.
>
> Move pointer_equals/2 into the private_builtin module.
>
> library/version_hash_table.m:
> library/private_builtin.m:
> Move pointer_equals/2 as above.
>
> Rename pointer_equals to pointer_equal.
>
> library/private_builtin.m:
> Adjust a comment to say that this module also contains predicates with
> normal definitions. That is, they're built into the language but not
> built into the compiler.
> ---
> library/private_builtin.m | 41 +++++++++++++++++++++++++++++++++++++++--
> library/version_hash_table.m | 32 ++------------------------------
> 2 files changed, 41 insertions(+), 32 deletions(-)
>
> diff --git a/library/private_builtin.m b/library/private_builtin.m
> index 1dd866d..58532c5 100644
> --- a/library/private_builtin.m
> +++ b/library/private_builtin.m
> @@ -23,8 +23,9 @@
> % does not get included in the Mercury library reference manual.
> %
> % Many of the predicates defined in this module are builtin - they do not have
> -% definitions because the compiler generates code for them inline. Some others
> -% are implemented in the runtime.
> +% definitions because the compiler generates code for them inline. A second
> +% group are implemented in the runtime. Whilst a third group are
> +% implemented normally in this module.
Please revert the wording of the first sentence, and delete "Whilst" in
the last.
> @@ -118,6 +119,12 @@
> %
> :- pred typed_compare(comparison_result::uo, T1::in, T2::in) is det.
>
> + % True iff the two terms occupy the same address in memory. This is
> + % useful as a cheap but incomplete test of equality when implmenting
> + % user-defined equality.
> + %
> +:- pred pointer_equal(T::in, T::in) is semidet.
implementing
Peter
More information about the reviews
mailing list