[m-users.] How to abbreviate a higher order mode?
Volker Wysk
post at volker-wysk.de
Thu Apr 2 00:43:25 AEDT 2026
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
More information about the users
mailing list