From post at volker-wysk.de Wed Apr 1 16:15:12 2026 From: post at volker-wysk.de (Volker Wysk) Date: Wed, 01 Apr 2026 07:15:12 +0200 Subject: [m-users.] Mercury under OpenSUSE In-Reply-To: <20260331141945.GP193260871890707@gmail.com> References: <7acd8a414fd83ad81e1f3e483de33030df5a968b.camel@volker-wysk.de> <5ba4a79c94b936c6babc973f7157cd93f5f16acd.camel@volker-wysk.de> <20260331141945.GP193260871890707@gmail.com> Message-ID: Am Dienstag, dem 31.03.2026 um 14:19 +1100 schrieb Peter Wang: > On Mon, 30 Mar 2026 04:35:21 +0200 Volker Wysk > wrote: > > Am Donnerstag, dem 26.03.2026 um 22:41 +1100 schrieb Zoltan Somogyi: > > > > > > > > > On Thu, 26 Mar 2026 11:54:41 +0100, Volker Wysk > > > wrote: > > > > It occurs only when you > > > > compile it in the parallel grade asm_fast.par.gc.stseg. > > > > > > I am afraid the non-hlc .par grades have had a bug for a while now, > > > which has a pretty low priority. I thought this fact was well > > > documented, > > > but it seems not. However, I have just committed a change that will > > > report this fact whenever anyone tries to use this combination > > > of grade components (in updated compilers, of course). > > > > I checked the Mercury documentation for information about this bug, but > > all > > I could find is this sentence from the User Guide: "Note: due to a code > > generation bug, at the moment LLDS parallelism does not work." I'm not > > sure > > if this is the documentation of the problem. > > > > And the User Guide doesn't state what "LLDS" means. I only found it in > > the > > "Notes on the design of the Melbourne Mercury compiler". > > (LLDS refers to the low-level C backends.) > > I've run a few tests and recorded the results here. > https://bugs.mercurylang.org/view.php?id=583 It says the severity is "minor". I don't agree... Volker From novalazy at gmail.com Wed Apr 1 16:54:15 2026 From: novalazy at gmail.com (Peter Wang) Date: Wed, 1 Apr 2026 16:54:15 +1100 Subject: [m-users.] Mercury under OpenSUSE In-Reply-To: References: <7acd8a414fd83ad81e1f3e483de33030df5a968b.camel@volker-wysk.de> <5ba4a79c94b936c6babc973f7157cd93f5f16acd.camel@volker-wysk.de> <20260331141945.GP193260871890707@gmail.com> Message-ID: <20260401165415.GE429330203755291@gmail.com> On Wed, 01 Apr 2026 07:15:12 +0200 Volker Wysk wrote: > Am Dienstag, dem 31.03.2026 um 14:19 +1100 schrieb Peter Wang: > > > > I've run a few tests and recorded the results here. > > https://bugs.mercurylang.org/view.php?id=583 > > It says the severity is "minor". I don't agree... Fair enough, updated. Peter From post at volker-wysk.de Thu Apr 2 00:43:25 2026 From: post at volker-wysk.de (Volker Wysk) Date: Wed, 01 Apr 2026 15:43:25 +0200 Subject: [m-users.] How to abbreviate a higher order mode? Message-ID: <7c13f00ab9a3cfe39f1aacdd951e595f5ec38241.camel@volker-wysk.de> Hi! I have higher-order arguments with lengthy types and modes, such as: pred(fis_args, list(string), master_loop_data, master_loop_data, io, io) ::in(pred(in, in, in, out, di, uo) is cc_multi), Now I want to abbreviate it, so it becomes something like this: master_prepare::in(master_prepare), I've tried this: :- type master_prepare ==  pred(fis_args, list(string), master_loop_data,  master_loop_data, io, io). :- inst master_prepare == pred(in, in, in, out, di, uo). The inst doesn't work - the right side is a mode, not an inst. This doesn't work either: :- mode master_prepare == pred(in, in, in, out, di, uo). Or: :- mode master_prepare == in(pred(in, in, in, out, di, uo)). Now I'm at a loss what to do. Is it possible somehow? Cheers, Volker From jfischer at opturion.com Thu Apr 2 01:03:49 2026 From: jfischer at opturion.com (Julien Fischer) Date: Thu, 2 Apr 2026 01:03:49 +1100 Subject: [m-users.] How to abbreviate a higher order mode? In-Reply-To: <7c13f00ab9a3cfe39f1aacdd951e595f5ec38241.camel@volker-wysk.de> References: <7c13f00ab9a3cfe39f1aacdd951e595f5ec38241.camel@volker-wysk.de> Message-ID: Hi, On Thu, 2 Apr 2026 at 00:43, Volker Wysk wrote: > > Hi! > > I have higher-order arguments with lengthy types and modes, such as: > > pred(fis_args, list(string), master_loop_data, master_loop_data, io, io) > ::in(pred(in, in, in, out, di, uo) is cc_multi), > > Now I want to abbreviate it, so it becomes something like this: > > master_prepare::in(master_prepare), > > I've tried this: > > :- type master_prepare == > pred(fis_args, list(string), master_loop_data, > master_loop_data, io, io). > > :- inst master_prepare == pred(in, in, in, out, di, uo). > > The inst doesn't work - the right side is a mode, not an inst. This doesn't > work either: That doesn't work for two reasons: 1. The RHS is not a mode nor an inst. A higher-order inst needs to both describe the modes of the arguments *and* the determinism (i.e. you've left out "is cc_multi"). 2. The second reason is that due to the relative precedence of the "==" and "is" operators you need to enclose the RHS in parenthesis. It should be: :- inst master_prepare == (pred(in, in, in, out, di, uo) is cc_multi). (See the "Higher-order insts and modes" section of the reference manual.) Julien. From post at volker-wysk.de Thu Apr 2 01:23:45 2026 From: post at volker-wysk.de (Volker Wysk) Date: Wed, 01 Apr 2026 16:23:45 +0200 Subject: [m-users.] How to abbreviate a higher order mode? In-Reply-To: References: <7c13f00ab9a3cfe39f1aacdd951e595f5ec38241.camel@volker-wysk.de> Message-ID: <932868629df41584c2026a0c289f6dd20ef307ea.camel@volker-wysk.de> Thank you very much. Volker Am Donnerstag, dem 02.04.2026 um 01:03 +1100 schrieb Julien Fischer: > Hi, > > On Thu, 2 Apr 2026 at 00:43, Volker Wysk wrote: > > > > Hi! > > > > I have higher-order arguments with lengthy types and modes, such as: > > > >     pred(fis_args, list(string), master_loop_data, master_loop_data, io, > > io) > >     ::in(pred(in, in, in, out, di, uo) is cc_multi), > > > > Now I want to abbreviate it, so it becomes something like this: > > > >     master_prepare::in(master_prepare), > > > > I've tried this: > > > > :- type master_prepare == > >     pred(fis_args, list(string), master_loop_data, > >     master_loop_data, io, io). > > > > :- inst master_prepare == pred(in, in, in, out, di, uo). > > > > The inst doesn't work - the right side is a mode, not an inst. This > > doesn't > > work either: > > That doesn't work for two reasons: > > 1. The RHS is not a mode nor an inst. A higher-order inst  needs to > both describe the modes > of the arguments *and* the determinism (i.e. you've left out "is > cc_multi"). > > 2. The second reason is that due to the relative precedence of the > "==" and "is" operators > you need to enclose the RHS in parenthesis. > > It should be: > >      :- inst master_prepare == (pred(in, in, in, out, di, uo) is > cc_multi). > > (See the "Higher-order insts and modes" section of the reference manual.) > > Julien.