[m-users.] XML library: highly ambigious overloadings

Volker Wysk post at volker-wysk.de
Fri Jun 24 04:11:23 AEST 2022


Hi

Following Zoltan's explanation, I've managed it to compile, like this:

main(!IO) :-
    Text = "bla.",
    pstate(mkEntity(Text), mkEncoding(utf8), init, !IO),
    finish(Res, !IO).

But I get a lot of warning messages about highly ambiguous overloading in
the xml.parse module. I've attached the error output. The ambigious names
should probably be qualified.

Cheers,
Volker
-------------- next part --------------
xml.parse.m:971: In clause for predicate `xmlDecl'/2:
xml.parse.m:971:   warning: highly ambiguous overloading.
xml.parse.m:971:   The following symbols were overloaded in the following
xml.parse.m:971:   contexts.
xml.parse.m:963:   The function symbol `lit'/1.
xml.parse.m:963:   The possible matches are:
xml.parse.m:963:     predicate `parsing.lit'/3,
xml.parse.m:963:     predicate `parsing.lit'/4.
xml.parse.m:968:   The function symbol `lit'/1 is also overloaded here.
xml.parse.m:965:   The function symbol `opt'/1.
xml.parse.m:965:   The possible matches are:
xml.parse.m:965:     predicate `parsing.opt'/3,
xml.parse.m:965:     predicate `parsing.opt'/4,
xml.parse.m:965:     predicate `parsing.opt'/5.
xml.parse.m:966:   The function symbol `opt'/1 is also overloaded here.
xml.parse.m:967:   The function symbol `opt'/1 is also overloaded here.
xml.parse.m:967:   The function symbol `s'/0.
xml.parse.m:967:   The possible matches are:
xml.parse.m:967:     the builtin type constructor `character',
xml.parse.m:967:     predicate `xml.parse.s'/2,
xml.parse.m:967:     function `unicode.s'/0.
xml.parse.m:970:   The function symbol `yes'/1.
xml.parse.m:970:   The possible matches are:
xml.parse.m:970:     the type constructor `parsing.opt'/1,
xml.parse.m:970:     predicate `parsing.yes'/2,
xml.parse.m:970:     predicate `parsing.yes'/3.
xml.parse.m:1099: In clause for predicate `doctypedecl'/2:
xml.parse.m:1099:   warning: highly ambiguous overloading.
xml.parse.m:1099:   The following symbols were overloaded in the following
xml.parse.m:1099:   contexts.
xml.parse.m:1094:   The function symbol `lit'/1.
xml.parse.m:1094:   The possible matches are:
xml.parse.m:1094:     predicate `parsing.lit'/3,
xml.parse.m:1094:     predicate `parsing.lit'/4.
xml.parse.m:1097:   The function symbol `opt'/1.
xml.parse.m:1097:   The possible matches are:
xml.parse.m:1097:     predicate `parsing.opt'/3,
xml.parse.m:1097:     predicate `parsing.opt'/4,
xml.parse.m:1097:     predicate `parsing.opt'/5.
xml.parse.m:1098:   The function symbol `opt'/1 is also overloaded here.
xml.parse.m:1099:   The function symbol `opt'/1 is also overloaded here.
xml.parse.m:1095:   The function symbol `s'/0.
xml.parse.m:1095:   The possible matches are:
xml.parse.m:1095:     the builtin type constructor `character',
xml.parse.m:1095:     predicate `xml.parse.s'/2,
xml.parse.m:1095:     function `unicode.s'/0.
xml.parse.m:1097:   The function symbol `s'/0 is also overloaded here.
xml.parse.m:1098:   The function symbol `s'/0 is also overloaded here.
xml.parse.m:1097:   The function symbol `snd'/1.
xml.parse.m:1097:   The possible matches are:
xml.parse.m:1097:     predicate `pair.snd'/2,
xml.parse.m:1097:     predicate `parsing.snd'/3,
xml.parse.m:1097:     function `pair.snd'/1.
xml.parse.m:1112: In predicate `parseInternalSubSet'/2:
xml.parse.m:1112:   warning: unresolved polymorphism.
xml.parse.m:1112:   The variables with unbound types were:
xml.parse.m:1112:     DCG_0: parsing.pstate(list.list(parsing.opt(T3)))
xml.parse.m:1112:     V_22: list.list(parsing.opt(T3))
xml.parse.m:1112:     LambdaHeadVar__2:
xml.parse.m:1112:     parsing.pstate(list.list(parsing.opt(T3)))
xml.parse.m:1112:     LambdaHeadVar__1: list.list(parsing.opt(T3))
xml.parse.m:1112:     V_14: pred(parsing.pstate(V_1),
xml.parse.m:1112:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1112:     V_12: pred(parsing.pstate(V_1),
xml.parse.m:1112:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1112:     V_11: pred(parsing.pstate(V_1),
xml.parse.m:1112:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1112:     V_9: pred(parsing.pstate(V_1),
xml.parse.m:1112:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1112:     V_8: pred(parsing.pstate(V_1),
xml.parse.m:1112:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1112:     V_7: pred(list.list(parsing.opt(T3)),
xml.parse.m:1112:     parsing.pstate(list.list(parsing.opt(T3))),
xml.parse.m:1112:     parsing.pstate(unit.unit))
xml.parse.m:1112:     V_6: pred(parsing.pstate(V_1),
xml.parse.m:1112:     parsing.pstate(list.list(parsing.opt(T3))))
xml.parse.m:1112:   The unbound type variables will be implicitly bound to the
xml.parse.m:1112:   builtin type `void'.
xml.parse.m:1135: In predicate `markupdecl'/2:
xml.parse.m:1135:   warning: unresolved polymorphism.
xml.parse.m:1135:   The variables with unbound types were:
xml.parse.m:1135:     DCG_0: parsing.pstate(parsing.opt(T3))
xml.parse.m:1135:     V_26: parsing.opt(T3)
xml.parse.m:1135:     LambdaHeadVar__2: parsing.pstate(parsing.opt(T3))
xml.parse.m:1135:     LambdaHeadVar__1: parsing.opt(T3)
xml.parse.m:1135:     V_19: pred(parsing.pstate(V_1),
xml.parse.m:1135:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1135:     V_17: pred(parsing.pstate(V_1),
xml.parse.m:1135:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1135:     V_16: pred(parsing.pstate(V_1),
xml.parse.m:1135:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1135:     V_14: pred(parsing.pstate(V_1),
xml.parse.m:1135:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1135:     V_13: pred(parsing.pstate(V_1),
xml.parse.m:1135:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1135:     V_11: pred(parsing.pstate(V_1),
xml.parse.m:1135:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1135:     V_10: pred(parsing.pstate(V_1),
xml.parse.m:1135:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1135:     V_8: pred(parsing.pstate(V_1),
xml.parse.m:1135:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1135:     V_7: pred(parsing.opt(T3),
xml.parse.m:1135:     parsing.pstate(parsing.opt(T3)),
xml.parse.m:1135:     parsing.pstate(unit.unit))
xml.parse.m:1135:     V_6: pred(parsing.pstate(V_1),
xml.parse.m:1135:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1135:   The unbound type variables will be implicitly bound to the
xml.parse.m:1135:   builtin type `void'.
xml.parse.m:1194: In predicate `extSubsetDecl'/2:
xml.parse.m:1194:   warning: unresolved polymorphism.
xml.parse.m:1194:   The variables with unbound types were:
xml.parse.m:1194:     DCG_0: parsing.pstate(list.list(parsing.opt(T3)))
xml.parse.m:1194:     V_25: list.list(parsing.opt(T3))
xml.parse.m:1194:     LambdaHeadVar__2:
xml.parse.m:1194:     parsing.pstate(list.list(parsing.opt(T3)))
xml.parse.m:1194:     LambdaHeadVar__1: list.list(parsing.opt(T3))
xml.parse.m:1194:     V_18: pred(parsing.pstate(V_1),
xml.parse.m:1194:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1194:     V_15: pred(parsing.pstate(V_1),
xml.parse.m:1194:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1194:     V_14: pred(parsing.pstate(V_1),
xml.parse.m:1194:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1194:     V_12: pred(parsing.pstate(V_1),
xml.parse.m:1194:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1194:     V_11: pred(parsing.pstate(V_1),
xml.parse.m:1194:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1194:     V_9: pred(parsing.pstate(V_1),
xml.parse.m:1194:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1194:     V_8: pred(parsing.pstate(V_1),
xml.parse.m:1194:     parsing.pstate(parsing.opt(T3)))
xml.parse.m:1194:     V_7: pred(list.list(parsing.opt(T3)),
xml.parse.m:1194:     parsing.pstate(list.list(parsing.opt(T3))),
xml.parse.m:1194:     parsing.pstate(unit.unit))
xml.parse.m:1194:     V_6: pred(parsing.pstate(V_1),
xml.parse.m:1194:     parsing.pstate(list.list(parsing.opt(T3))))
xml.parse.m:1194:   The unbound type variables will be implicitly bound to the
xml.parse.m:1194:   builtin type `void'.
xml.parse.m:1700: In clause for predicate `elementdecl'/2:
xml.parse.m:1700:   warning: highly ambiguous overloading.
xml.parse.m:1700:   The following symbols were overloaded in the following
xml.parse.m:1700:   contexts.
xml.parse.m:1695:   The function symbol `lit'/1.
xml.parse.m:1695:   The possible matches are:
xml.parse.m:1695:     predicate `parsing.lit'/3,
xml.parse.m:1695:     predicate `parsing.lit'/4.
xml.parse.m:1700:   The function symbol `opt'/1.
xml.parse.m:1700:   The possible matches are:
xml.parse.m:1700:     predicate `parsing.opt'/3,
xml.parse.m:1700:     predicate `parsing.opt'/4,
xml.parse.m:1700:     predicate `parsing.opt'/5.
xml.parse.m:1696:   The function symbol `s'/0.
xml.parse.m:1696:   The possible matches are:
xml.parse.m:1696:     the builtin type constructor `character',
xml.parse.m:1696:     predicate `xml.parse.s'/2,
xml.parse.m:1696:     function `unicode.s'/0.
xml.parse.m:1698:   The function symbol `s'/0 is also overloaded here.
xml.parse.m:1881: In clause for predicate `mixed1'/2:
xml.parse.m:1881:   warning: highly ambiguous overloading.
xml.parse.m:1881:   The following symbols were overloaded in the following
xml.parse.m:1881:   contexts.
xml.parse.m:1874:   The function symbol `('/0.
xml.parse.m:1874:   The possible matches are:
xml.parse.m:1874:     the builtin type constructor `character',
xml.parse.m:1874:     function `unicode.('/0.
xml.parse.m:1876:   The function symbol `lit'/1.
xml.parse.m:1876:   The possible matches are:
xml.parse.m:1876:     predicate `parsing.lit'/3,
xml.parse.m:1876:     predicate `parsing.lit'/4.
xml.parse.m:1880:   The function symbol `lit'/1 is also overloaded here.
xml.parse.m:1874:   The function symbol `lit1'/1.
xml.parse.m:1874:   The possible matches are:
xml.parse.m:1874:     predicate `parsing.lit1'/3,
xml.parse.m:1874:     predicate `parsing.lit1'/4.
xml.parse.m:1877:   The function symbol `lit1'/1 is also overloaded here.
xml.parse.m:1881:   The function symbol `mixed'/1.
xml.parse.m:1881:   The possible matches are:
xml.parse.m:1881:     the type constructor `xml.dtd.content'/0,
xml.parse.m:1881:     the type constructor `xml.dtd.mixed'/0,
xml.parse.m:1881:     predicate `xml.parse.mixed'/2.
xml.parse.m:1875:   The function symbol `opt'/1.
xml.parse.m:1875:   The possible matches are:
xml.parse.m:1875:     predicate `parsing.opt'/3,
xml.parse.m:1875:     predicate `parsing.opt'/4,
xml.parse.m:1875:     predicate `parsing.opt'/5.
xml.parse.m:1877:   The function symbol `opt'/1 is also overloaded here.
xml.parse.m:1879:   The function symbol `opt'/1 is also overloaded here.
xml.parse.m:1875:   The function symbol `s'/0.
xml.parse.m:1875:   The possible matches are:
xml.parse.m:1875:     the builtin type constructor `character',
xml.parse.m:1875:     predicate `xml.parse.s'/2,
xml.parse.m:1875:     function `unicode.s'/0.
xml.parse.m:1877:   The function symbol `s'/0 is also overloaded here.
xml.parse.m:1879:   The function symbol `s'/0 is also overloaded here.
xml.parse.m:1877:   The function symbol `snd'/1.
xml.parse.m:1877:   The possible matches are:
xml.parse.m:1877:     predicate `pair.snd'/2,
xml.parse.m:1877:     predicate `parsing.snd'/3,
xml.parse.m:1877:     function `pair.snd'/1.
xml.parse.m:1877:   The function symbol `|'/0.
xml.parse.m:1877:   The possible matches are:
xml.parse.m:1877:     the builtin type constructor `character',
xml.parse.m:1877:     function `unicode.|'/0.
xml.parse.m:1943: In clause for predicate `attlistDecl'/2:
xml.parse.m:1943:   warning: highly ambiguous overloading.
xml.parse.m:1943:   The following symbols were overloaded in the following
xml.parse.m:1943:   contexts.
xml.parse.m:1938:   The predicate symbol `foldl'/4.
xml.parse.m:1938:   The possible matches are:
xml.parse.m:1938:     predicate `array.foldl'/4,
xml.parse.m:1938:     predicate `list.foldl'/4,
xml.parse.m:1938:     predicate `map.foldl'/4,
xml.parse.m:1938:     predicate `string.foldl'/4.
xml.parse.m:1935:   The function symbol `>'/0.
xml.parse.m:1935:   The possible matches are:
xml.parse.m:1935:     the builtin type constructor `character',
xml.parse.m:1935:     the type constructor `builtin.comparison_result'/0,
xml.parse.m:1935:     predicate `int.>'/2,
xml.parse.m:1935:     function `unicode.>'/0.
xml.parse.m:1943:   The function symbol `elements'/1.
xml.parse.m:1943:   The possible matches are:
xml.parse.m:1943:     a `get' field access function for the type constructor
xml.parse.m:1943:     `xml.dtd.dtd'/0,
xml.parse.m:1943:     the type constructor `xml.parse.elements'/0.
xml.parse.m:1930:   The function symbol `lit'/1.
xml.parse.m:1930:   The possible matches are:
xml.parse.m:1930:     predicate `parsing.lit'/3,
xml.parse.m:1930:     predicate `parsing.lit'/4.
xml.parse.m:1935:   The function symbol `lit1'/1.
xml.parse.m:1935:   The possible matches are:
xml.parse.m:1935:     predicate `parsing.lit1'/3,
xml.parse.m:1935:     predicate `parsing.lit1'/4.
xml.parse.m:1934:   The function symbol `opt'/1.
xml.parse.m:1934:   The possible matches are:
xml.parse.m:1934:     predicate `parsing.opt'/3,
xml.parse.m:1934:     predicate `parsing.opt'/4,
xml.parse.m:1934:     predicate `parsing.opt'/5.
xml.parse.m:1931:   The function symbol `s'/0.
xml.parse.m:1931:   The possible matches are:
xml.parse.m:1931:     the builtin type constructor `character',
xml.parse.m:1931:     predicate `xml.parse.s'/2,
xml.parse.m:1931:     function `unicode.s'/0.
xml.parse.m:1934:   The function symbol `s'/0 is also overloaded here.
xml.parse.m:2092: In clause for predicate `notationType'/2:
xml.parse.m:2092:   warning: highly ambiguous overloading.
xml.parse.m:2092:   The following symbols were overloaded in the following
xml.parse.m:2092:   contexts.
xml.parse.m:2089:   The function symbol `('/0.
xml.parse.m:2089:   The possible matches are:
xml.parse.m:2089:     the builtin type constructor `character',
xml.parse.m:2089:     function `unicode.('/0.
xml.parse.m:2087:   The function symbol `lit'/1.
xml.parse.m:2087:   The possible matches are:
xml.parse.m:2087:     predicate `parsing.lit'/3,
xml.parse.m:2087:     predicate `parsing.lit'/4.
xml.parse.m:2089:   The function symbol `lit1'/1.
xml.parse.m:2089:   The possible matches are:
xml.parse.m:2089:     predicate `parsing.lit1'/3,
xml.parse.m:2089:     predicate `parsing.lit1'/4.
xml.parse.m:2091:   The function symbol `nmtoken'/0.
xml.parse.m:2091:   The possible matches are:
xml.parse.m:2091:     the type constructor `xml.dtd.type'/0,
xml.parse.m:2091:     predicate `xml.parse.nmtoken'/2.
xml.parse.m:2090:   The function symbol `opt'/1.
xml.parse.m:2090:   The possible matches are:
xml.parse.m:2090:     predicate `parsing.opt'/3,
xml.parse.m:2090:     predicate `parsing.opt'/4,
xml.parse.m:2090:     predicate `parsing.opt'/5.
xml.parse.m:2088:   The function symbol `s'/0.
xml.parse.m:2088:   The possible matches are:
xml.parse.m:2088:     the builtin type constructor `character',
xml.parse.m:2088:     predicate `xml.parse.s'/2,
xml.parse.m:2088:     function `unicode.s'/0.
xml.parse.m:2090:   The function symbol `s'/0 is also overloaded here.
xml.parse.m:2092:   The function symbol `snd'/1.
xml.parse.m:2092:   The possible matches are:
xml.parse.m:2092:     predicate `pair.snd'/2,
xml.parse.m:2092:     predicate `parsing.snd'/3,
xml.parse.m:2092:     function `pair.snd'/1.
xml.parse.m:2253: In clause for predicate `includeSect'/2:
xml.parse.m:2253:   warning: highly ambiguous overloading.
xml.parse.m:2253:   The following symbols were overloaded in the following
xml.parse.m:2253:   contexts.
xml.parse.m:2251:   The function symbol `['/0.
xml.parse.m:2251:   The possible matches are:
xml.parse.m:2251:     the builtin type constructor `character',
xml.parse.m:2251:     function `unicode.['/0.
xml.parse.m:2247:   The function symbol `lit'/1.
xml.parse.m:2247:   The possible matches are:
xml.parse.m:2247:     predicate `parsing.lit'/3,
xml.parse.m:2247:     predicate `parsing.lit'/4.
xml.parse.m:2249:   The function symbol `lit'/1 is also overloaded here.
xml.parse.m:2253:   The function symbol `lit'/1 is also overloaded here.
xml.parse.m:2251:   The function symbol `lit1'/1.
xml.parse.m:2251:   The possible matches are:
xml.parse.m:2251:     predicate `parsing.lit1'/3,
xml.parse.m:2251:     predicate `parsing.lit1'/4.
xml.parse.m:2248:   The function symbol `opt'/1.
xml.parse.m:2248:   The possible matches are:
xml.parse.m:2248:     predicate `parsing.opt'/3,
xml.parse.m:2248:     predicate `parsing.opt'/4,
xml.parse.m:2248:     predicate `parsing.opt'/5.
xml.parse.m:2250:   The function symbol `opt'/1 is also overloaded here.
xml.parse.m:2248:   The function symbol `s'/0.
xml.parse.m:2248:   The possible matches are:
xml.parse.m:2248:     the builtin type constructor `character',
xml.parse.m:2248:     predicate `xml.parse.s'/2,
xml.parse.m:2248:     function `unicode.s'/0.
xml.parse.m:2250:   The function symbol `s'/0 is also overloaded here.
xml.parse.m:2586: In clause for predicate `geDecl'/2:
xml.parse.m:2586:   warning: highly ambiguous overloading.
xml.parse.m:2586:   The following symbols were overloaded in the following
xml.parse.m:2586:   contexts.
xml.parse.m:2581:   The function symbol `lit'/1.
xml.parse.m:2581:   The possible matches are:
xml.parse.m:2581:     predicate `parsing.lit'/3,
xml.parse.m:2581:     predicate `parsing.lit'/4.
xml.parse.m:2586:   The function symbol `opt'/1.
xml.parse.m:2586:   The possible matches are:
xml.parse.m:2586:     predicate `parsing.opt'/3,
xml.parse.m:2586:     predicate `parsing.opt'/4,
xml.parse.m:2586:     predicate `parsing.opt'/5.
xml.parse.m:2582:   The function symbol `s'/0.
xml.parse.m:2582:   The possible matches are:
xml.parse.m:2582:     the builtin type constructor `character',
xml.parse.m:2582:     predicate `xml.parse.s'/2,
xml.parse.m:2582:     function `unicode.s'/0.
xml.parse.m:2584:   The function symbol `s'/0 is also overloaded here.
xml.parse.m:2611: In clause for predicate `peDecl'/2:
xml.parse.m:2611:   warning: highly ambiguous overloading.
xml.parse.m:2611:   The following symbols were overloaded in the following
xml.parse.m:2611:   contexts.
xml.parse.m:2608:   The function symbol `%'/0.
xml.parse.m:2608:   The possible matches are:
xml.parse.m:2608:     the builtin type constructor `character',
xml.parse.m:2608:     function `unicode.%'/0.
xml.parse.m:2606:   The function symbol `lit'/1.
xml.parse.m:2606:   The possible matches are:
xml.parse.m:2606:     predicate `parsing.lit'/3,
xml.parse.m:2606:     predicate `parsing.lit'/4.
xml.parse.m:2608:   The function symbol `lit1'/1.
xml.parse.m:2608:   The possible matches are:
xml.parse.m:2608:     predicate `parsing.lit1'/3,
xml.parse.m:2608:     predicate `parsing.lit1'/4.
xml.parse.m:2607:   The function symbol `s'/0.
xml.parse.m:2607:   The possible matches are:
xml.parse.m:2607:     the builtin type constructor `character',
xml.parse.m:2607:     predicate `xml.parse.s'/2,
xml.parse.m:2607:     function `unicode.s'/0.
xml.parse.m:2609:   The function symbol `s'/0 is also overloaded here.
xml.parse.m:2611:   The function symbol `s'/0 is also overloaded here.
xml.parse.m:3154: In clause for predicate `notationDecl'/2:
xml.parse.m:3154:   warning: highly ambiguous overloading.
xml.parse.m:3154:   The following symbols were overloaded in the following
xml.parse.m:3154:   contexts.
xml.parse.m:3149:   The function symbol `lit'/1.
xml.parse.m:3149:   The possible matches are:
xml.parse.m:3149:     predicate `parsing.lit'/3,
xml.parse.m:3149:     predicate `parsing.lit'/4.
xml.parse.m:3154:   The function symbol `opt'/1.
xml.parse.m:3154:   The possible matches are:
xml.parse.m:3154:     predicate `parsing.opt'/3,
xml.parse.m:3154:     predicate `parsing.opt'/4,
xml.parse.m:3154:     predicate `parsing.opt'/5.
xml.parse.m:3150:   The function symbol `s'/0.
xml.parse.m:3150:   The possible matches are:
xml.parse.m:3150:     the builtin type constructor `character',
xml.parse.m:3150:     predicate `xml.parse.s'/2,
xml.parse.m:3150:     function `unicode.s'/0.
xml.parse.m:3152:   The function symbol `s'/0 is also overloaded here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mercurylang.org/archives/users/attachments/20220623/e3a56ba1/attachment-0001.sig>


More information about the users mailing list