Mercury Bugs - mercury |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0000096 | mercury | Bug | public | 2009-05-28 12:14 | 2010-01-27 17:06 |
|
Reporter | pbone | |
---|
Assigned To | rafe | |
---|
Priority | normal | Severity | text | Reproducibility | always |
---|
Status | resolved | Resolution | fixed | |
---|
Platform | | OS | | OS Version | |
---|
Product Version | | |
---|
Target Version | | Fixed in Version | | |
---|
|
Summary | 0000096: some predicates parsing_utils are documented with arguments in an incorrect order. |
---|
Description |
Some documentation comments in parsing_utils don't match the actual order of the aguments of the predicate.
|
---|
Additional Information |
For example:
% keyword(Src, IdChars, Keyword, _, !PS) matches Keyword exactly (i.e., it
% must not be followed by any character in IdChars) and any subsequent
% whitespace.
%
:- pred keyword(string::in, string::in, src::in, unit::out,
ps::in, ps::out) is semidet.
Above the src argument has the third place in the type declaration (which is correct making this easy to use as a curried higher order argument to other predicates), while the documentation places this argument in the first place.
|
---|
Tags | No tags attached. |
---|
Relationships | |
Attached Files | |
---|
Notes |
|
(0000167)
|
pbone
|
2009-05-28 12:21
|
|
It seems that the set module has the same problem. |
|
|
|
For the sake of uniformity in the parsing_utils module it would be better if the
Src argument was always first (when present) -- that's what half of the predicates
in the interface of that module do anyway.
Which predicates in the set module had inconsistent documentation? I looked but
couldn't see any. |
|
|
(0000170)
|
pbone
|
2009-06-02 17:00
|
|
Julien:
When accepting more than the four arguments (src::in, T::out, ps::in, ps::out) a predicate must put the extra arguments before the source argument. Many predicates in this module take a higher order argument with these four arguments that is semidet. Predicates who's argument lists end in exactly these four arguments can be easily curried to create higher order arguments. |
|
|
(0000171)
|
pbone
|
2009-06-02 17:14
|
|
Disregard my comments about the set module with regard to this bug. |
|
|
|
Fix committed, see r1.5 of library/parsing_utils.m. |
|