Mercury Bugs - mercury
View Issue Details
0000285mercuryBugpublic2013-05-22 11:242013-06-28 15:54
Assigned To 
PrioritynormalSeveritytweakReproducibilityhave not tried
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000285: Mode error is misleading
DescriptionA mode error can be causes when code is multidet when it is declared as det. In these case the error text uses the phrase "multiple clauses with solutions". Even for single clause predicates.
Steps To ReproduceCreate a single clause predicate declared as det such as:

update_atom_in_map(Atom, SubstsA, Status, OrigHt, !Map) :-
        (!.Map, Atom, EntryPrime) ->
            Entry = EntryPrime
        ;, Atom, EntryPrime) ->
            Entry = EntryPrime
        ), # HERE is the error, this should be a -> rather than a ,
        Entry = memo_table_entry(SubstsB, _),
        Substs = SubstsA `union` SubstsB
        Substs = SubstsA
    set(Atom, memo_table_entry(Substs, Status), !Map).
TagsNo tags attached.
Attached Files

2013-05-22 13:15   
The only such error message I can find is:

     "Disjunction has multiple clauses with solutions."

That seems fairly unambiguous for the example above.
2013-06-28 15:36   
I don't like the confusion with clauses. Could it say something like "Disjunction has multiple parts with solutions?"
2013-06-28 15:54   
"clause" is a standard term in predicate logic for describing the "parts" of a disjunction. As I said in my original reply, I don't see that the error message has any ambiguity anyway.

Issue History
2013-05-22 11:24pboneNew Issue
2013-05-22 13:15juliensfNote Added: 0000525
2013-06-28 15:36pboneNote Added: 0000547
2013-06-28 15:54juliensfNote Added: 0000549