mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-20 20:03:44 +00:00
Estimated hours taken: 0.5 The Aditi transaction paper published a few years ago contained a small error which I included in my code -- the state arguments passed into queries to ensure that database predicates are only called from within a transaction should have mode `mui' rather than `ui'. Compiling queries with the alias branch mode checker confirms this. Because `mui' modes do not yet work on the main branch, `aditi_mui' (equivalent to `in') is used instead. This change replaces all instances of `aditi_ui' with `aditi_mui'. compiler/*.m: doc/*.texi: extras/aditi/*: tests/valid/aditi*.m: tests/invalid/aditi*.m: s/aditi_ui/aditi_mui
25 lines
777 B
Mathematica
25 lines
777 B
Mathematica
%-----------------------------------------------------------------------------%
|
|
% File: base_relation2.m
|
|
% Author: stayl
|
|
%
|
|
% Test calling an imported Aditi procedure from a module containing
|
|
% no Aditi predicates. The compiler of 6/4/2000 aborted on this
|
|
% test case because the `aditi' marker was not removed from the
|
|
% imported predicate, resulting in arg_infos not being computed for it.
|
|
%-----------------------------------------------------------------------------%
|
|
:- module base_relation2.
|
|
|
|
:- interface.
|
|
|
|
:- import_module aditi.
|
|
|
|
:- pred query(aditi__state::aditi_mui, int::in, int::out) is nondet.
|
|
|
|
%-----------------------------------------------------------------------------%
|
|
:- implementation.
|
|
|
|
:- import_module base_relation.
|
|
|
|
query(DB, X, Y) :-
|
|
base(DB, X, Y).
|